fal i2i (FLUX.1 Kontext) — backend side#464
Open
mcarlson wants to merge 2 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
i2ivariation can be created, routed, and billed.Changes
perImagepricing kind ({ kind: 'perImage'; usdPerImage }) — flatper-image cost (qty 1;
JobCostParamscarries no count).priceFromPricingexported for unit testing;
perImagemodels carry noimageSizesconstraint.flux-kontext-i2iinMODEL_CATALOG— fal, image,constraints: {},pricing: { kind: 'perImage', usdPerImage: 0.04 }.SUPPORTED_ALGORITHMS,ALGORITHM_TO_QUEUE_MAP→falimage, and theisImageGenerationAlgorithmallowlist (mediaType routing is backend-authoritative).
Tests / gates (TDD)
cost.util.test.ts— perImage is a flat per-image cost (red→green).prompt.util.test.ts—flux-kontext-i2iis supported, routes tofalimage,and is classified as an image-generation algorithm.
pnpm run buildclean.Coordinated PRs (Part 2)
image_url, noimage_size)dream.utilintentionally untouched (forwardssource_dream_uuidverbatim).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