Skip to content

feat: add fast, lower-credit 360p draft generation (--draft) - #12

Open
rainmeter33-jpg wants to merge 2 commits into
kodelyx:mainfrom
rainmeter33-jpg:feat/draft-360p
Open

feat: add fast, lower-credit 360p draft generation (--draft)#12
rainmeter33-jpg wants to merge 2 commits into
kodelyx:mainfrom
rainmeter33-jpg:feat/draft-360p

Conversation

@rainmeter33-jpg

Copy link
Copy Markdown

Summary

Google Flow's Gemini Omni 1.1 Flash (Aug 27, 2026) added a resolution ladder — 360p → 720p (default) → 1080p → 4K — where the 360p step is a draft mode: it renders faster and bills at roughly half the credits of the 720p default. It is the "draft quickly, upscale for quality" workflow behind the Flow UI's 360p option.

The wire format is a model-key suffix: abra_t2v_{duration}s_360p (verified live against the Flow sandbox API; the generation request otherwise has no resolution field, and the delivery resolution parameter only covers the 1080p/4K upsampler pass).

This PR threads a draft option through the whole stack:

Layer Change
Engine generate_video (t2v) and generate_video_i2v/generate_video_fl/generate_video_r2v gain draft: bool = False; when set (and no explicit video_model), the model key gets the _360p suffix
HTTP API POST /v1/videos/generations accepts "draft": true (VideoGenerationRequest)
CLI flow video --draft
Docs README: --draft usage + the credit table

Verified

  • Live against the sandbox API: 4s draft → 360x640 output at 4 credits (vs 7 at 720p); 6s draft → 5 credits (vs 10).
  • 3 new tests (tests/test_video_draft.py): engine model-key for t2v/i2v, explicit video_model override wins over draft, CLI payload flag.
  • Full suite: 80 passed (3 pre-existing test_ext_http_api port-binding failures pass once port 9227 is free).

Usage

flow video "a dragon flying over mountains" --draft          # 360p, ~half credits
flow video "a dragon flying over mountains" --draft --duration 6
# keeper at full res:
flow video "a dragon flying over mountains" --resolution 1080p

Note for maintainers: credit figures are the observed sandbox billing; the repo's CREDITS_PER_VIDEO table currently reflects the 720p prices, so a --draft generation is also a natural way to stretch daily free credits further.

Support a --draft flag (HTTP field draft: true) that requests a faster,
lower-credit 360p video draft by computing the _360p model key in the
generation route, reusing the existing video_model override (4/5/6/7
credits vs 7/10/12/15 at 720p). Engine untouched.
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.

2 participants