Skip to content

[refactor] CogVideoX followups + tiled decoding support #9150

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 19 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update
  • Loading branch information
a-r-r-o-w committed Aug 12, 2024
commit 9de509dcf458b0620233f435d12121a05bb6aede
6 changes: 3 additions & 3 deletions src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def __call__(
negative_prompt: Optional[Union[str, List[str]]] = None,
height: int = 480,
width: int = 720,
num_frames: int = 48,
num_frames: int = 49,
num_inference_steps: int = 50,
timesteps: Optional[List[int]] = None,
guidance_scale: float = 6,
Expand Down Expand Up @@ -524,9 +524,9 @@ def __call__(
`tuple`. When returning a tuple, the first element is a list with the generated images.
"""

if num_frames > 48:
if num_frames > 49:
raise ValueError(
"The number of frames must be less than 48 for now due to static positional embeddings. This will be updated in the future to remove this limitation."
"The number of frames must be less than 49 for now due to static positional embeddings. This will be updated in the future to remove this limitation."
)

if isinstance(callback_on_step_end, (PipelineCallback, MultiPipelineCallbacks)):
Expand Down
4 changes: 2 additions & 2 deletions tests/pipelines/cogvideox/test_cogvideox.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def test_inference(self):
video = pipe(**inputs).frames
generated_video = video[0]

self.assertEqual(generated_video.shape, (9, 3, 16, 16))
expected_video = torch.randn(9, 3, 16, 16)
self.assertEqual(generated_video.shape, (8, 3, 16, 16))
expected_video = torch.randn(8, 3, 16, 16)
max_diff = np.abs(generated_video - expected_video).max()
self.assertLessEqual(max_diff, 1e10)

Expand Down
Loading