Repository navigation
[feat] provider: continuation, masked editing and keyframes for FastH3-Omni models - #541
Open
princepride wants to merge 8 commits into
Open
princepride wants to merge 8 commits into
princepride wants to merge 8 commits into
Conversation
…3-Omni models ## summary vLLM-Omni now serves continuation, latent-mask editing and timeline keyframes on every MiniMax-H3 weight set, but OpenDirector offered them only on the native H3 profile. Models that use the FastH3-Omni request shape (FastH3 Omni, Pika Flex Turbo and other 8-step adapters) had structure control and nothing else. - Continuation: the `fasth3-omni` profile declares the `continuation` mode and sends `continue_from` with the source's size instead of uploading the source video. A source the service no longer holds gets its own message. - Masked editing: `FastH3VideoEdit` gives the profile `video.edit`, so partial reshoot, video edit and subtitle erasure work. It sends a Ref2VA request with the clip's first frame as the reference picture. - Keyframes: a reference can take the role `keyframe` with `frameTimeMs`. Both H3 profiles declare `maxKeyframes` (8) and send `timeline_guides`. The composer shows a time box per connected image in material-reference mode, and the CLI accepts `video create --keyframe ITEM_UUID@SECONDS`. - Long reference videos: a FastH3-Omni model reads at most 15 seconds of reference video, so a longer one is sent as its final window instead of being rejected. - Contracts regenerated; both locales and both user guides updated; a design note records what is and is not implemented. ## validation - pytest -m cpu tests - npm test, npx tsc --noEmit, npm run check:i18n - scripts/generate_contracts.py --check, lint-imports - Browser run against a self-hosted vLLM-Omni MiniMax-H3 Ref2VA server with the Pika Flex Turbo 8-step LoRA: continuation, boxed video edit and keyframes submitted from the canvas and checked in the server log Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
## summary - Add the inputs and results of the four H3 conditioning abilities run inside OpenDirector on one set of material: the source dance video, the reference picture, the person-only depth control video, and the structure-control, continuation, video-edit and keyframe results. Videos are downscaled to 540 pixels wide. - Record what each file is, where the source video comes from, what was measured and the limits of one seed per ability in the design note. ## validation - pre-commit over the branch Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
## summary - Replace the two still comparison sheets with four animated GIFs, one per ability, so the motion is visible in the design note and in the pull request: structure control beside its source and control video, the continuation after the end of the clip it continues, video edit before and after, and keyframes beside their pinned pictures. - The GIFs are 8 frames per second at reduced size; the videos remain the full-quality record. ## validation - pre-commit over the branch Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rame ## summary - A Ref2VA model opens a clip close to its reference picture. The edit adapter sent the source's first frame, which still shows what the box replaces, so the redrawn region kept the old content at the start and the edit only appeared a second or more into the clip. At fixed seeds frame 0 of the region matched the source in 9 of 9 runs. - Painting the region out of the reference, cropping it away or rewording the prompt does not help: the start then shows the gray patch or a second copy of the picture's subject. The service rejects a request without a reference. - Run a boxed redraw twice. The second pass takes the last edited frame of the first as its reference, so the edit is in the picture the clip opens on. Both jobs are reported, so a cancel reaches the running one. - A whole-frame redraw of a span that opens the clip now takes its reference from the first frame after the span instead of a frame it replaces. - Add `media.last_frame_time`: a clip's sound may outlast its picture. - Regenerate the video-edit example, and take the interface screenshots on the same Dunhuang material as the other examples. ## validation - pytest tests/test_fasth3_video_edit.py tests/test_tool_tasks.py, lint-imports - Real vLLM-Omni MiniMax-H3 Ref2VA server with the Pika 8-step LoRA, at fixed seeds: two passes showed the edit from frame 0 in 5 of 6 runs and within half a second in the sixth; the opening-span reference showed the requested change in 3 of 3 runs against 1 of 3 before - The video-edit tool run through OpenDirector on the example clip Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
## summary - Bring in ThinkFlowLab#529 and ThinkFlowLab#544. One conflict, in creation_generation.py: main now passes the composed prompt to the job, this branch adds `frameTimeMs` to its reference roles. Both are kept. ## validation - npm test, npx tsc --noEmit, npm run check:i18n - scripts/generate_contracts.py --check, lint-imports - The video-edit tool and the keyframe composer checked on the merged build against the self-hosted MiniMax-H3 server Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…d keyframes ## summary - Partial reshoot over a whole clip failed: the reference frame of an opening span was looked up past the clip's real end. The frame is now taken from the real clip, and a span that keeps nothing after it falls back to the first frame. - Extend switched every clip to continuation mode on a FastH3-Omni model, so an uploaded clip was rejected at submission. Only a clip the same model configuration generated is continued; any other stays a reference video. - The capability check for a continuation saw the panel's size instead of the source's size that is sent. - Keyframes: a keyframe on a first-frame spec was dropped silently and is now refused; times are compared as the output frames they land on, in the backend and in the canvas precheck; keyframes no longer count as reference images in the reference budget or in the declared request inputs; the keyframe error codes are part of the contract and have English copy. - Canvas: the time boxes stay while a time is set, so it can be cleared after choosing a model without keyframes; a copied node keeps its times on the copied pictures, and a removed or disconnected picture drops its time. - CLI: `--keyframe ID@inf` is a usage error, not a traceback. ## validation - pytest -m cpu tests, npm test, npx tsc --noEmit, npm run check:i18n - scripts/generate_contracts.py --check, lint-imports - Real MiniMax-H3 Ref2VA server through the tool interface: partial reshoot over the whole clip and over an opening span - Browser: Extend on an uploaded clip stays in reference mode, on a generated clip it opens in continuation mode Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keyframes travel as timeline guides beside the reference pictures, but no request-size check counted them: submission summed only the reference pictures, execution measured only the data-URI inputs, and the canvas budget dropped keyframe nodes. Eight 30 MB guides could exceed a 160 MB FastH3 request, and two guides could take a native H3 request past its 64 MB. All three checks now include the guides; keyframes still do not count toward the reference counts or lengths. A guided request always asks the service for lossless quality, since cache acceleration is rejected with timeline guides. The keyframes panel now says so while a time is set, in both languages. Also list the H3 conditioning design document in the documentation index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
vLLM-Omni now serves continuation, latent-mask editing and timeline keyframes on every MiniMax-H3 weight set (vllm-project/vllm-omni#11078). OpenDirector offered them only on the native H3 profile. A model that uses the FastH3-Omni request format (FastH3 Omni, Pika Flex Turbo and the other 8-step adapters) had material reference and structure control, and nothing else.
This pull request opens the same abilities to the
fasth3-omniprofile and adds keyframes at chosen times to both H3 profiles.fasth3-omnideclares thecontinuationvideo mode. The request carriescontinue_fromand the source's own size, and does not upload the source video. Extend video on a clip this service generated now continues it. When the service no longer holds the source, the error says so.FastH3VideoEditadapter gives the profilevideo.edit, so Partial reshoot, Video edit and Subtitle erasure are available. The existing native adapter sendstask=t2va, which a Ref2VA-only server rejects; this one sends a Ref2VA request with a frame of the clip as the reference picture. A boxed redraw runs twice, so that the edit is there from the first frame (see below).keyframewithframeTimeMs. Input rules declaremaxKeyframes(8 on both H3 profiles). Both request paths sendtimeline_guides,guide_filesandquality=lossless. In material-reference mode the composer shows a time box for each connected image; the CLI acceptsvideo create --keyframe ITEM_UUID@SECONDS. Keyframes belong to material-reference mode: the backend rejects them in first/last-frame, continuation and structure-control requests, needs an ordinary reference beside them, and checks their count and times.docs/development/h3-conditioning-features.mdrecords the design, what was measured, and what is not implemented.docs/development/assets/h3-conditioning/, and four animated GIFs (9.9 MB) underdocs/development/images/h3-conditioning/. Drop those commits if you would rather not keep media in the repository.This is one concern (H3 conditioning on the FastH3-Omni request format) but four parts. If you prefer to review them separately, I can split it into four pull requests in this order: long reference videos, continuation, masked editing, keyframes.
Why a boxed redraw runs twice
A Ref2VA model opens a clip close to its reference picture. With the source's first frame as that picture, the redrawn region kept its old content at the start and the edit only arrived a second or more into the clip: at fixed seeds, frame 0 of the region matched the source in 9 of 9 runs. Painting the region out of the reference, cropping it away or rewording the prompt did not help (the start then showed the gray patch, or a second copy of the picture's subject), and the service rejects a request without a reference.
So the adapter runs the request twice. The first pass arrives at the edit by its end; the second takes the last edited frame of the first as its reference, so the edit is in the picture the clip opens on. At fixed seeds this showed the edit from frame 0 in 5 of 6 runs and within half a second in the sixth. It costs twice the time (about 50 s instead of 27 s for a 5-second clip here). Both jobs are reported to the tool task, so a cancel reaches the one that is running.
A whole-frame redraw of a time span still runs once. When the span opens the clip, its reference is now the first frame after the span instead of a frame the edit replaces: at fixed seeds the requested change then appeared in 3 of 3 runs, against 1 of 3 (and only briefly) before.
Review fixes (last commit)
A review of this branch found the following, all fixed with tests:
continuationmade the canvas switch every extension draft to continuation mode. Now only a clip the same model configuration generated is continued; any other stays a reference video, as the user guide says.keyframe_mode.invalid_input, and English callers no specific message. They are inIssueCodenow, with English copy.--keyframe ID@infon the CLI raised a traceback.Not in this pull request
Linked issue
No issue applies.
Fixes #NorRefs #Nis included, or no issue appliesLabels
I cannot apply labels from a fork. Suggested:
type:feat,area:provider,area:canvas.Test plan
creation_generation.py):npm test: 1029 passednpx tsc --noEmit,npm run check:i18n(3423 keys, 0 problems),python scripts/generate_contracts.py --check,lint-imports: passedpython -m pre_commit run --from-ref origin/main --to-ref HEAD: passedpython -m pytest tests/test_reference_video_window.py tests/test_fasth3_continuation.py tests/test_fasth3_video_edit.py tests/test_h3_keyframes.py tests/test_agent_metadata.py tests/test_video_gateway.py: 116 passedpython -m pytest -m cpu tests(full CPU suite) on this commit, with nothing else running: 3181 passed, 118 skipped. An earlier run on the previous commit that shared the machine with a frontend build, a service restart and real generations had 2 failures (test_fractional_video_duration_survives_acceptance_and_wireforFastH3-Omniat 107 and 108 frames); they have not recurred in two quiet runs, andchecks / pythonpassed on that commit.Evidence that it works
Screenshots from a self-hosted server (base MiniMax-H3 Ref2VA with the Pika Flex Turbo 8-step LoRA, FastH3-Omni request format), on the same material as the examples further down.
Keyframes, Chinese and English:
Extend video on a clip the model generated opens in Continue mode:
Video edit is available on the same model:
One set of real material through all four abilities
The docs-only commits add the inputs and results of a run inside OpenDirector on one set of material, with what was measured, in
docs/development/h3-conditioning-features.md(section 8). The source dance video comes from Bilibili (BV1yFyWziEGF) and is used as a test input only. One seed per ability, not selected.Structure control. Source video, person-only depth control video, result, over the same six seconds.
Continuation. The first two seconds are the end of the earlier clip; the rest is the continuation.
Video edit. Before and after redrawing the upper part of the frame, regenerated with the two-pass fix: the night sky is there from the first frame.
Keyframes. The picture pinned at 1.25 s, the result, the picture pinned at 4.583 s.
The animations run at 8 frames per second at reduced size. Full-quality videos: source, control video, structure control, continuation, video edit, keyframes.
Provider verification
Real service: one self-hosted vLLM-Omni server running base MiniMax-H3 with
--task-type ref2va, the Pika Flex Turbo 8-step LoRA and the Fun ControlNet branch, reached through the video gateway from #538. Everything below was submitted from the canvas in a browser, and the server's log was checked for the request it applied.continue_fromwith the earlier job's id and returned a clip. On the last commit, in the browser: Extend video on an uploaded clip opens in material-reference mode, on a generated clip in Continue mode.Not verified against a real service:
The native H3 profile (
vllm-omni-h3). I have no FL2VA server, so its keyframe request is covered by unit tests only.FastH3 Omni weights themselves. The FastH3-Omni request format was exercised with Pika Flex Turbo on base H3.
Long reference videos on this commit. The clipping is covered by unit tests, and I did not rerun it against the server after rebasing.
The two-pass redraw on prompts and clips other than the one example. Six seeds on one clip and one prompt is a small sample.
Real-provider calls are described honestly, or none were made
Bilingual UI
New strings (keyframe title, placeholder, labels and the new rejection messages) ship in
zh-CNanden-US;npm run check:i18npasses. I looked at the keyframe boxes in both languages, which is how the clipped English placeholder was found and fixed. The user guide is updated in both languages. The design note underdocs/development/is in Chinese only.🤖 Generated with Claude Code