We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 158a5a8 commit c5ce24fCopy full SHA for c5ce24f
src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py
@@ -41,9 +41,7 @@ class CogVideoXSafeConv3d(nn.Conv3d):
41
"""
42
43
def forward(self, input: torch.Tensor) -> torch.Tensor:
44
- memory_count = (
45
- (input.shape[0] * input.shape[1] * input.shape[2] * input.shape[3] * input.shape[4]) * 2 / 1024**3
46
- )
+ memory_count = torch.prod(torch.tensor(input.shape)) * 2 / 1024**3
47
48
# Set to 2GB, suitable for CuDNN
49
if memory_count > 2:
0 commit comments