fix: video frame validation to enable automatic clipping in inference pipeline#197
Merged
aryamancodes merged 1 commit intoSep 2, 2025
Merged
Conversation
Signed-off-by: Jeana Choi <jeanachoi@jeanachoi-mlt.client.nvidia.com>
jeanachoi
marked this pull request as ready for review
August 29, 2025 20:47
Contributor
|
APPROVED_FOR_CI_RUN |
Contributor
|
pipelines/34098563 |
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.
Issues
get_pixel_num_framesandget_latent_num_framesraise errors if the frame count isn't divisible by 121. This prevents inputs with more than 121 frames that aren't multiples of 121 from proceeding, even though autoclipping logic exists further down the pipeline before tensor reshaping.Fix
Validation is already enforced where tensor reshaping happens.
cosmos-transfer1/cosmos_transfer1/diffusion/module/pretrained_vae.py
Lines 361 to 376 in bc18a6b
Because of this, we can relax these asserts to only check for inputs that don't meet the minimum frame requirement. The error message is updated to clearly indicate the issue.