Replies: 2 comments 2 replies
-
I just couldn't execute this code even with 80GB of GPU memory, so I think this may be a problem with my code? So how can I use this 3D VAE to encode my video? |
Beta Was this translation helpful? Give feedback.
1 reply
-
It is said that ~34 GB is needed for encoding. Could you try with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
vae.encode in AutoencoderKLCogVideoX consumes too much GPU memory, I don't know exactly how much it will consume, but my 24GB GPU cannot run successfully. I want to know if there is a way to optimize this?
from diffusers.models import AutoencoderKLCogVideoX
vae = AutoencoderKLCogVideoX.from_pretrained("THUDM/CogVideoX-2b", subfolder="vae", torch_dtype=torch.float16).to("cuda")
frames = torch.rand(torch.Size([1, 49, 3, 720, 480])).half().cuda()
frames = frames.permute(0, 2, 1, 3, 4)
frames = vae.scaling_factor * frames
latents = vae.encode(frames).sample
I get "CUDA out of memory" using the above code.
Beta Was this translation helpful? Give feedback.
All reactions