Expand migrated image API: model selection, edits and 2K export - #42
Open
Bl0ck154 wants to merge 3 commits into
Open
Expand migrated image API: model selection, edits and 2K export#42Bl0ck154 wants to merge 3 commits into
Bl0ck154 wants to merge 3 commits into
Conversation
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.
Summary
Expands the migrated
flow.google.comimage path with the capabilities currently exposed by Flow's UI, fixes Nano Banana Pro transport/count semantics, adds bounded wave-based recovery for transient image failures, and restores true image edit + high-resolution export.What changes
image_modelselection onPOST /api/flow/generate-imageHARBOR_SEAL(Nano Banana 2 Lite) alongside Nano Banana Pro / Nano Banana 2count(1-4) and optionalseedcount=Nlike Flow itself: N independent single-imageogiZ0bRPCs, each with its own single-use reCAPTCHAsource-pathand page locale metadata;GEM_PIX_2requires this even where Lite is tolerant[8][8], once, after a 34-second cooldown with fresh request UUIDs and the same seedcomplete=false,generated_count, andfailed_variants1:1,9:16,16:9,3:4,4:3IMAGE_ASPECT_RATIO_PORTRAIT_THREE_FOURspelling while retaining the old alias/api/flow/edit-image: source media uses Flow'sBASE_IMAGEwire type (2), extra refs remainREFERENCEtype (1)SPrCad/FlowService.UpsampleImagePOST /api/flow/export-image(2kdefault,4kplan-gated)Live verification
Verified end-to-end against the current Flow frontend/account:
count=4source-pathmatches the UIogiZ0brequests, not one multi-item RPCcomplete=true, in 63.37sBASE_IMAGEedit successfullySPrCad2K export produced a valid JPEG; 1376x768 source -> 2752x1536 (~3.1 MB)The current Flow UI exposes exactly five image aspect ratios:
1:1,9:16,16:9,3:4,4:3.The
[8]retry is explicitly a FlowKit resilience policy. Live UI capture did not show the same automatic retry after a failed x4 wave.Forward compatibility
Flow can add model ids independently of FlowKit releases. Previously an unknown model was silently replaced with
GEM_PIX_2; this PR only falls back for blank/invalid ids, while a valid Flow-style wire id is preserved as requested.Validation
image_model,count,seed,reference_media_ids, and/api/flow/export-imagegit diff --checkcleanThe repository's full test run on upstream
ce37f4bstill has the same unrelated pre-existing failures aroundprocessor._retry_stateandresult_handlerfixtures (3 failed, 250 passed, 9 errors); the focused migrated Flow/image tests are green.