Skip to content

[feat] provider: continuation, masked editing and keyframes for FastH3-Omni models - #541

Open
princepride wants to merge 8 commits into
ThinkFlowLab:mainfrom
princepride:feat/h3-conditioning
Open

princepride wants to merge 8 commits into
ThinkFlowLab:mainfrom
princepride:feat/h3-conditioning

Conversation

@princepride

@princepride princepride commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

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-omni profile and adds keyframes at chosen times to both H3 profiles.

  • Continuation. fasth3-omni declares the continuation video mode. The request carries continue_from and 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.
  • Masked editing. A new FastH3VideoEdit adapter gives the profile video.edit, so Partial reshoot, Video edit and Subtitle erasure are available. The existing native adapter sends task=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).
  • Keyframes. A reference can take the role keyframe with frameTimeMs. Input rules declare maxKeyframes (8 on both H3 profiles). Both request paths send timeline_guides, guide_files and quality=lossless. In material-reference mode the composer shows a time box for each connected image; the CLI accepts video 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.
  • Long reference videos. A FastH3-Omni model reads at most 15 seconds of reference video. A longer video is now sent as its final window instead of being rejected, and the job records which window was sent.
  • Contracts are regenerated. Both locales and both user guides are updated. docs/development/h3-conditioning-features.md records the design, what was measured, and what is not implemented.
  • Two docs-only commits add the test material (the fix commit regenerates the video-edit example): 6.6 MB of downscaled video and pictures under docs/development/assets/h3-conditioning/, and four animated GIFs (9.9 MB) under docs/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:

  • Partial reshoot over a whole clip failed with an internal error: the reference frame of an opening span was looked up past the clip's real end. Introduced by the two-pass commit.
  • Extend on an uploaded clip was rejected. Declaring continuation made 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.
  • The capability check for a continuation saw the wrong size (the panel's, not the source's that is sent).
  • A keyframe on a first-frame spec was dropped silently; it is now refused with keyframe_mode.
  • Two keyframe times could land on one frame, or past the last one. Times are now compared as output frames, in the backend and in the canvas precheck.
  • Keyframes were counted as reference images in the canvas reference budget and in the declared request inputs.
  • The keyframe error codes were not in the contract, so clients received invalid_input, and English callers no specific message. They are in IssueCode now, with English copy.
  • The time boxes disappeared after choosing a model without keyframes while the times stayed set and blocked generation. The boxes stay while a time is set.
  • A copied node lost its keyframe times. They now follow the copied pictures; a removed or disconnected picture drops its time.
  • --keyframe ID@inf on the CLI raised a traceback.

Not in this pull request

  • Structure control still has one type (depth) at strength 1.0.
  • Keyframes are offered in material-reference mode only, not in first-frame mode.
  • Importing a canvas archive is not checked for keyframe times; reopening a project restores them from the backend references. (Copying a node now keeps them, see the review fixes.)
  • The masked-edit tools take a box and a time span, not a free-form mask.
  • A clip longer than one request is redrawn in pieces, and each piece is redrawn on its own, so the redrawn content can differ between pieces. That was already so; the two-pass change does not address it.

Linked issue

No issue applies.

  • Fixes #N or Refs #N is included, or no issue applies

Labels

I cannot apply labels from a fork. Suggested: type:feat, area:provider, area:canvas.

  • Labels applied

Test plan

  • Local, on this commit (after merging main, which brought in [feat] canvas: apply image presets as prompt skills #529 and [bugfix] core: fix storage, Codex, timeline and image output regressions #544 with one conflict in creation_generation.py):
    • npm test: 1029 passed
    • npx tsc --noEmit, npm run check:i18n (3423 keys, 0 problems), python scripts/generate_contracts.py --check, lint-imports: passed
    • python -m pre_commit run --from-ref origin/main --to-ref HEAD: passed
    • python -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 passed
    • python -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_wire for FastH3-Omni at 107 and 108 frames); they have not recurred in two quiet runs, and checks / python passed on that commit.
  • Left to CI: the browser lanes, the build and wheel jobs, Windows and macOS. I did not add a browser-suite script for the keyframe time boxes; the checks I ran in a browser are described below and are not automated.

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:

Keyframes zh-CN

Keyframes en-US

Extend video on a clip the model generated opens in Continue mode:

Continue mode

Video edit is available on the same model:

Video edit

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.

Structure control

Continuation. The first two seconds are the end of the earlier clip; the rest is the continuation.

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.

Video edit

Keyframes. The picture pinned at 1.25 s, the result, the picture pinned at 4.583 s.

Keyframes

The animations run at 8 frames per second at reduced size. Full-quality videos: source, control video, structure control, continuation, video edit, keyframes.

  • Media attached, or N/A because:

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.

  • Continuation. Extend video on a generated clip; the server logged continue_from with 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.
  • Masked editing. Video edit with a boxed region, run through the tool-task interface on the example clip, twice on the final build: both results show the edit from frame 0, with PSNR 39.2 dB outside the box and 17.5 dB inside. The reference-picture findings above come from about 70 further requests sent with the adapter's own request builder at fixed seeds. On the last commit, Partial reshoot ran through the tool-task interface over the whole clip (the case that failed) and over an opening span; both returned a clip. I did not look at how well those two results follow the prompt, and I did not run Subtitle erasure; it shares the adapter and is covered by unit tests with a recorded transport.
  • Keyframes. Two pictures pinned at 1.25 s and 4 s; the frames of the result at those times match the pictures.
  • Structure control is unchanged; I ran it once on the updated build to confirm the new modes did not disturb it.

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-CN and en-US; npm run check:i18n passes. 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 under docs/development/ is in Chinese only.

  • Both locales are updated, or no user-facing copy changed

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added area:provider Model providers and generation protocols modality:video Video generation, editing or rendering type:feat New capability or behaviour labels Nov 27, 2026
## 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>
@github-actions github-actions Bot added the area:canvas Canvas, nodes and direct manipulation label Nov 27, 2026
## 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>
@github-actions github-actions Bot added the area:docs Documentation / 文档 label Nov 27, 2026
@github-actions
github-actions Bot requested a review from wuzhf9 November 27, 2026 09:59
princepride and others added 2 commits November 27, 2026 16:34
…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>
@github-actions github-actions Bot added the provider:minimax MiniMax H3 / speech / music services label Nov 27, 2026
…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>
@FayeSpica FayeSpica mentioned this pull request Nov 29, 2026
44 tasks
princepride and others added 2 commits November 30, 2026 08:30
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:canvas Canvas, nodes and direct manipulation area:docs Documentation / 文档 area:provider Model providers and generation protocols modality:video Video generation, editing or rendering provider:minimax MiniMax H3 / speech / music services type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant