Skip to content

fix(inference): reject video_save_quality=0 at validation, not after generation - #336

Open
rwagwani wants to merge 1 commit into
NVIDIA:mainfrom
rwagwani:fix/video-save-quality-min-1
Open

rwagwani wants to merge 1 commit into
NVIDIA:mainfrom
rwagwani:fix/video-save-quality-min-1

Conversation

@rwagwani

Copy link
Copy Markdown
Collaborator

Summary

VideoSaveQuality accepted 0-10, but imageio-ffmpeg asserts 1 <= quality <= 10 when it writes vision.mp4. A request with video_save_quality: 0 loaded the model, generated the whole video, and only then failed with quality must be between 1 and 10 inclusive. 11 and -1 were already rejected at startup.

Change

  • VideoSaveQuality becomes ge=1, le=10, so 0 is rejected at startup like the other out-of-range values. The field description now says 1-10.
  • Reasoner mode filled an inert video_save_quality = 0 placeholder (its output is text, so the value is never read). It is now 10, so reasoner samples still validate. The existing test_edge_num_frames_default caught this.

Behaviour change: video_save_quality: 0 is now rejected for every mode, including image modes (text2image, image2image) that never read it. No shipped spec, default or notebook uses 0 (the values in use are 4, 8 and 10).

Verification

  • New L0 tests: 1, 5 and 10 accepted; -1, 0 and 11 rejected.
  • args_test.py: 67 passed.
  • The CI unit-test job (-m L0, same command as gpu-tests.yml), replicated on a single GB300: 790 passed on this branch vs 784 on main 1a2f03a. The 6 extra are the new tests. The one failure (activation_marks_test.py::test_marking_costs_less_memory_than_saving_every_eligible_op) fails the same way on main on this machine.
  • GPU, Cosmos3-Nano-Sim-Transfer depth (one AV clip, one Robotics clip), every value from -1 to 11: -1, 0 and 11 are rejected at startup before the model loads; 1-10 all generate, file size rises with quality, and quality 10 gives the same video as before the change.

🤖 Generated with Claude Code

…generation

VideoSaveQuality accepted 0-10, but imageio-ffmpeg asserts
1 <= quality <= 10 when it writes vision.mp4. A request with
video_save_quality=0 therefore loaded the model, generated the whole
video, and only then failed with "quality must be between 1 and 10
inclusive". 11 and -1 were already rejected at startup.

Tighten the type to ge=1 so 0 is rejected at startup like the other
out-of-range values. Reasoner mode filled an inert placeholder of 0
(its output is text, so the value is never used); set it to 10 so
reasoner samples still validate.

Signed-off-by: rwagwani <rwagwani@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rwagwani
rwagwani force-pushed the fix/video-save-quality-min-1 branch from 93b2357 to 24b4a16 Compare November 3, 2026 08:09

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant