Skip to content

Commit 7f323f0

Browse files
Xiang-cda-r-r-o-w
andauthored
fix cogvideox autoencoder decode (#9569)
Co-authored-by: Aryan <aryan@huggingface.co>
1 parent 61d3764 commit 7f323f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ def _decode(self, z: torch.Tensor, return_dict: bool = True) -> Union[DecoderOut
12341234
return self.tiled_decode(z, return_dict=return_dict)
12351235

12361236
frame_batch_size = self.num_latent_frames_batch_size
1237-
num_batches = num_frames // frame_batch_size
1237+
num_batches = max(num_frames // frame_batch_size, 1)
12381238
conv_cache = None
12391239
dec = []
12401240

0 commit comments

Comments
 (0)