Skip to content
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

Fix Latte Pipeline support #288

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/latte_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def main():
output = pipe(
height=input_config.height,
width=input_config.width,
num_frames=16,
video_length=16,
prompt=input_config.prompt,
num_inference_steps=input_config.num_inference_steps,
output_type="pt",
Expand Down
5 changes: 3 additions & 2 deletions xfuser/model_executor/pipelines/pipeline_latte.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __call__(
timesteps: Optional[List[int]] = None,
guidance_scale: float = 7.5,
num_images_per_prompt: int = 1,
num_frames: int = 16,
video_length: int = 16,
height: int = 512,
width: int = 512,
eta: float = 0.0,
Expand Down Expand Up @@ -116,7 +116,7 @@ def __call__(
Paper](https://arxiv.org/pdf/2205.11487.pdf). Guidance scale is enabled by setting `guidance_scale >
1`. Higher guidance scale encourages to generate videos that are closely linked to the text `prompt`,
usually at the expense of lower video quality.
num_frames (`int`, *optional*, defaults to 16):
video_length (`int`, *optional*, defaults to 16):
The number of video frames that are generated. Defaults to 16 frames which at 8 frames per seconds
num_images_per_prompt (`int`, *optional*, defaults to 1):
The number of videos to generate per prompt.
Expand Down Expand Up @@ -172,6 +172,7 @@ def __call__(
callback_on_step_end_tensor_inputs = callback_on_step_end.tensor_inputs

# 0. Default
num_frames = video_length
decode_chunk_size = (
decode_chunk_size if decode_chunk_size is not None else num_frames
)
Expand Down