Skip to content

Some consistency-related fixes for HunyuanVideo #10835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

a-r-r-o-w
Copy link
Member

No description provided.

@a-r-r-o-w a-r-r-o-w requested a review from yiyixuxu February 19, 2025 21:58
@a-r-r-o-w a-r-r-o-w changed the title Fix Hunyuan type hint Some consistency-related fixes for HunyuanVideo Feb 19, 2025
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

latents = self.prepare_latents(
batch_size * num_videos_per_prompt,
num_channels_latents,
height,
width,
num_latent_frames,
num_frames,
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this change just for make code is less confusing? (we were passing latents_frame as num_frames before)

Copy link
Member Author

Choose a reason for hiding this comment

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

So, in prepare_latents, we calculate the latent height and latent width from the actual height/width BUT expect the num_frames to mean number of latent frames.

With this change, we make the interface uniform. prepare_latents now takes pixel-space width/height/num_frames and performs the latent related calculations in itself. We need to make these interfaces uniform a bit otherwise it leads to inconvenient behavior, so I will try to keep this behaviour consistent across all new implementations and gradually introduce changes to other pipelines

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good!

latents = self.prepare_latents(
batch_size * num_videos_per_prompt,
num_channels_latents,
height,
width,
num_latent_frames,
num_frames,
Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good!

@a-r-r-o-w a-r-r-o-w merged commit f070775 into main Feb 20, 2025
14 of 15 checks passed
@a-r-r-o-w a-r-r-o-w deleted the fix-hunyuan-video-type-hint branch February 20, 2025 22:07
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.

3 participants