Skip to content

fix(video): support chunk flow Euler in video inference - #576

Merged
lawrence-cj merged 1 commit into
NVlabs:mainfrom
yuhengcai1:codex/fix-chunk-video-sampler
Nov 12, 2026
Merged

lawrence-cj merged 1 commit into
NVlabs:mainfrom
yuhengcai1:codex/fix-chunk-video-sampler

Conversation

@yuhengcai1

Copy link
Copy Markdown
Contributor

The chunk video configuration selects chunk_flow_euler, but the generic video inference entry point has no branch for it and raises ValueError: chunk_flow_euler is not defined. This connects the existing ChunkFlowEuler sampler to that entry point, derives the chunk boundaries from the configuration, and uses the same automatic interval convention as the WM entry point. A missing chunk configuration now produces an actionable error.

The regression test exercises the complete visualize body with the real sampler and a constant-velocity model. It checks CFG on/off, automatic/explicit intervals, prefix lengths and per-frame timesteps, the integrated latent result, and the missing-configuration error on CPU and CUDA. Text encoding, VAE decoding, and video writing are replaced with small test doubles; no pretrained weights are needed.

Validation against main b3bad9563288b5fd0dc5734fc230827acf70f23e:

  • Local CPU: before 5 failed, 5 CUDA cases skipped; after 5 passed, 5 skipped.
  • Colab NVIDIA A100-SXM4-40GB: before 10 failed; after 10 passed (5 CPU + 5 CUDA), with PyTorch 2.11.0+cu130 and Diffusers 0.42.1.
  • All applicable repository-pinned Python pre-commit hooks and git diff --check pass.

Validation scope: the standalone runner loads the unchanged complete visualize and sampler class definitions from the exact source files while isolating unrelated module imports. It executes the submitted test functions against the real PyTorch/Diffusers scheduler; it does not validate the full Sana import/dependency setup, CLI, or pretrained video quality. Source hashes and JUnit results were captured. The committed test uses normal project imports for the supported Sana environment.

Fixes #355.

@lawrence-cj lawrence-cj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yuhengcai1, LGTM. This matches the WM entry point's ChunkFlowEuler wiring and fixes #355.

@lawrence-cj
lawrence-cj merged commit f3b4c16 into NVlabs:main Nov 12, 2026
11 checks passed
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.

ValueError: chunk_flow_euler is not defined

2 participants