Feat/seed fl frames and sequence tools - #3
Open
santoshray02 wants to merge 2 commits into
Open
Conversation
Commit 61014b8 removed the gitignore, but the README still documents that outputs, logs, build artifacts and local credentials are ignored. Without it, `git add -A` sweeps in generated media (16 files / ~15 MB in output/), __pycache__, build/ and egg-info, and a populated SERVER_API_KEY in a local config.env would be one command away from being committed.
The Flow API already accepts these fields, but the wrapper discarded them. Generation parameters: - seed: was hardcoded to random.randint(1, 9999) in every generator and unreachable from the HTTP API, CLI or MCP. Now plumbed through t2v, i2v, fl, r2v, v2v and t2i, accepting the full uint32 range. Multi-item batches offset from the base seed so a pinned value still yields distinct takes. Omitting it preserves the previous random behaviour exactly. - end_media_id / end_image_base64: generate_video_fl and the batchAsyncGenerateVideoStartAndEndImage endpoint already existed, but no caller could reach them. Supplying an end frame alongside a start frame now routes to first-last mode. - video_model: overrides the videoModelKey, which was hardcoded to abra_t2v_<duration>s. Measured: an explicit seed is accepted by the server (including values well above the old 9999 cap) but does NOT make generation deterministic -- identical prompt+seed pairs differ (image SSIM 0.36, video SSIM 0.77). The parameter is plumbed correctly; the backend simply does not honour it. Shot-to-shot continuity therefore comes from pinned frames, not seeds. New MCP tools (9 -> 12), all requiring FFmpeg and failing with a clear message when it is absent: - generate_flow_sequence: generates an ordered shot list, carrying each clip's final frame into the next shot as its start image. Measured seam continuity SSIM 0.967. Stops at the first failure and reports the index rather than burning credits on a derailed run. - extract_video_frame: first / last / indexed frame to PNG. - concat_flow_videos: ordered concat with optional single narration track, re-encoding so clips with differing SAR or timebase join cleanly. Also fixes a latent NameError: uuid was used but never imported in flow_mcp_server.py.
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
Exposes three Flow API fields the wrapper already sent but discarded, and adds
FFmpeg-backed tooling for multi-shot continuity.
Generation parameters
seed— was hardcoded torandom.randint(1, 9999)in every generator andunreachable from the HTTP API, CLI or MCP. Now plumbed through t2v, i2v, fl,
r2v, v2v and t2i, accepting the full uint32 range. Batches offset from the base
seed so a pinned value still yields distinct takes.
end_media_id/end_image_base64—generate_video_fland thebatchAsyncGenerateVideoStartAndEndImageendpoint already existed, but nocaller could reach them. An end frame alongside a start frame now routes to
first-last mode.
video_model— overridesvideoModelKey, previously hardcoded toabra_t2v_<duration>s.New MCP tools (9 → 12)
generate_flow_sequence— generates an ordered shot list, carrying each clip'sfinal frame into the next shot as its start image.
extract_video_frame— first / last / indexed frame to PNG.concat_flow_videos— ordered concat with optional single narration track.FFmpeg is required only by these three tools; they fail with a clear message when
it is absent rather than breaking imports.
Fixes
uuidwas used but never imported inflow_mcp_server.py(latentNameError)..gitignore, removed in 61014b8. Without itgit add -Asweeps ingenerated media,
__pycache__,build/andegg-info.Testing
Verified against a live Flow session:
777777, 777778, 777779for count=3).prompt+seed pairs differ (image SSIM 0.36, video SSIM 0.77). Plumbing is
correct; the backend does not honour it.
0.791 last frame vs end keyframe.
Backward compatible — omitting the new fields preserves prior behaviour exactly.