Skip to content

fal i2i (FLUX.1 Kontext) — backend side#464

Open
mcarlson wants to merge 2 commits into
stagefrom
feat/studio-i2i-variations
Open

fal i2i (FLUX.1 Kontext) — backend side#464
mcarlson wants to merge 2 commits into
stagefrom
feat/studio-i2i-variations

Conversation

@mcarlson

Copy link
Copy Markdown
Collaborator

fal i2i (FLUX.1 Kontext) — backend side (Part 2)

Registers the FLUX.1 Kontext image-to-image model and a flat perImage
pricing kind so the studio i2i variation can be created, routed, and billed.

Changes

  • perImage pricing kind ({ kind: 'perImage'; usdPerImage }) — flat
    per-image cost (qty 1; JobCostParams carries no count). priceFromPricing
    exported for unit testing; perImage models carry no imageSizes constraint.
  • flux-kontext-i2i in MODEL_CATALOG — fal, image, constraints: {},
    pricing: { kind: 'perImage', usdPerImage: 0.04 }.
  • Algorithm registration — added to SUPPORTED_ALGORITHMS,
    ALGORITHM_TO_QUEUE_MAPfalimage, and the isImageGenerationAlgorithm
    allowlist (mediaType routing is backend-authoritative).

Tests / gates (TDD)

  • cost.util.test.ts — perImage is a flat per-image cost (red→green).
  • prompt.util.test.tsflux-kontext-i2i is supported, routes to falimage,
    and is classified as an image-generation algorithm.
  • Full unit suite: 65 passing; pnpm run build clean.

Coordinated PRs (Part 2)

  • worker: Feat/s3 upload #51 — Kontext submit path (image_url, no image_size)
  • frontend: #665 — enables the i2i variation method + Kontext payload

dream.util intentionally untouched (forwards source_dream_uuid verbatim).
Live GPU run deferred to post-merge on staging. Spec:
docs/superpowers/specs/2026-06-28-studio-i2i-variations-on-stage-design.md.

🤖 Generated with Claude Code

mcarlson and others added 2 commits June 30, 2026 14:54
Flat per-image cost (qty 1; JobCostParams carries no count). Export
priceFromPricing for unit testing. perImage carries no imageSizes constraint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MODEL_CATALOG entry (perImage $0.04, no imageSizes), SUPPORTED_ALGORITHMS,
ALGORITHM_TO_QUEUE_MAP -> falimage, and isImageGenerationAlgorithm allowlist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant