Skip to content
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

OutOfMemoryError: Nvidia L4 24 Gi VRAM #64

Open
radioactive11 opened this issue Dec 14, 2024 · 2 comments
Open

OutOfMemoryError: Nvidia L4 24 Gi VRAM #64

radioactive11 opened this issue Dec 14, 2024 · 2 comments

Comments

@radioactive11
Copy link

I am getting CUDA out of memory on an Nvidia L4 with 24 GB of VRAM, even after using the bfloat16 optimization.

This is the inference invocation I used: python inference.py --ckpt_path ckpt/ltx-video-2b-v0.9.safetensors --prompt "purple leaves on a tree" --num_frames 50 --seed 42 --bfloat16 --height 512 --width 512

@xgiral-metacodi
Copy link

I test and you need 32bg RAM of GPU shared memory on Windows, works fine but its too slow, with one GPU 24 GB of VRAM,

Now i tried on 2 RTX3090 24 GB VRAM, and had this error:
return t.to( torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 64.00 MiB. GPU 0 has a total capacity of 24.00 GiB of which 0 bytes is free. Of the allocated memory 22.89 GiB is allocated by PyTorch, and 355.13 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

@nitinmukesh
Copy link

@radioactive11

See if this helps
https://youtu.be/4Wo1Kgluzd4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants