Skip to content

fix(video): recognize padded filenames when resuming inference - #578

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

lawrence-cj merged 1 commit into
NVlabs:mainfrom
yuhengcai1:codex/fix-video-resume-output-name

Conversation

@yuhengcai1

Copy link
Copy Markdown
Contributor

Video inference writes names such as 000. first-key.mp4, but its resume check looks for 0. first-key.mp4. Re-running the same job therefore regenerates and overwrites outputs for indices 0–99. Use the same three-digit minimum width in the existing-file check as in the writer.

The regression test generates an output, runs the same request again, and checks that text encoding, model execution, and video writing are skipped and that file bytes/mtime are unchanged. It then changes the key at the same index and verifies a new output is generated. Indices 0, 9, 99, and 100 cover the padding boundary.

Validation on CPU with PyTorch 2.9.1 (the repository pin): before 3 failed / 1 passed; after 4 passed. The same results hold with PyTorch 2.5.1. All applicable repository-pinned Python pre-commit hooks and git diff --check pass.

The local validation harness executes the complete, unchanged visualize function body with real temporary files; text/model/sampler/VAE/codec use test doubles. It isolates unrelated package imports and does not load model weights or run GPU inference. The committed regression test uses normal project imports. Batch resume policy and output filenames are otherwise unchanged.

@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. The resume check now matches the writer's :03d filename.

@lawrence-cj
lawrence-cj merged commit 51e53bd 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.

2 participants