Skip to content

Commit 0e1a22a

Browse files
committed
reverted change
1 parent d66abdc commit 0e1a22a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ class CogVideoXSafeConv3d(nn.Conv3d):
4141
"""
4242

4343
def forward(self, input: torch.Tensor) -> torch.Tensor:
44-
memory_count = torch.prod(torch.tensor(input.shape)) * 2 / 1024**3
44+
memory_count = (
45+
(input.shape[0] * input.shape[1] * input.shape[2] * input.shape[3] * input.shape[4]) * 2 / 1024**3
46+
)
4547

4648
# Set to 2GB, suitable for CuDNN
4749
if memory_count > 2:

0 commit comments

Comments
 (0)