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

trouble running due to memory #2

Open
ownimage opened this issue Jul 15, 2023 · 1 comment
Open

trouble running due to memory #2

ownimage opened this issue Jul 15, 2023 · 1 comment

Comments

@ownimage
Copy link

I have a Nvidia 2060 Super 8GB ... is this enough?
I see that the model download is 10GB and I am getting

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 26.00 MiB (GPU 0; 8.00 GiB total capacity; 7.21 GiB already allocated; 0 bytes free; 7.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Sorry for the noobie question , I just don't want to be chasing my tail trying to fix the impossible.

@fypbiqi
Copy link

fypbiqi commented Sep 14, 2023

Try to add this before training?
import os
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:128"

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