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

torch.OutOfMemoryError: CUDA out of memory #30

Open
Lenan22 opened this issue Nov 26, 2024 · 1 comment
Open

torch.OutOfMemoryError: CUDA out of memory #30

Lenan22 opened this issue Nov 26, 2024 · 1 comment

Comments

@Lenan22
Copy link

Lenan22 commented Nov 26, 2024

When I run : python -m deepcompressor.app.diffusion.ptq configs/model/flux.1-schnell.yaml configs/svdquant/int4.yaml --eval-benchmarks MJHQ --eval-num-samples 1024

torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 384.00 MiB. GPU 0 has a total capacity of 39.56 GiB of which 359.62 MiB is free. Process 4119960 has 448.00 MiB memory in use. Process 1215056 has 38.77 GiB memory in use. Of the allocated memory 38.17 GiB is allocated by PyTorch, and 104.10 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)

My A800 only has 40G of storage and can't run through this example of yours. Is there a new flux.1-schnell.yaml configuration available for me? I want to get it to run through and verify the effect of quantization.

@senlyu163
Copy link

Hi, i met OOM too, do u solve it?

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

2 participants