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

RuntimeError: CUDA out of memory. Tried to allocate 2.81 GiB #180

Open
x011 opened this issue Aug 25, 2022 · 5 comments
Open

RuntimeError: CUDA out of memory. Tried to allocate 2.81 GiB #180

x011 opened this issue Aug 25, 2022 · 5 comments

Comments

@x011
Copy link

x011 commented Aug 25, 2022

I'm aware that previous issues have been raised regarding RuntimeError: CUDA out of memory, but is there a way to avoid this error by making the code run for longer time and not use as much memory? Can the PYTORCH_CUDA_ALLOC_CONF be used on discoart? If so, how?

  • GPU 0; 15.90 GiB total capacity; 9.86 GiB already allocated; 1.41 GiB free; 13.59 GiB reserved in total by PyTorch
  • DiscoArt Version: 0.12.0
@mlew980
Copy link

mlew980 commented Sep 13, 2022

I also get the same error, running both via Docker and when running directly.
DiscoArt Version: 0.12.0
RuntimeError: CUDA out of memory. Tried to allocate 960.00 MiB (GPU 0; 6.00 GiB total capacity; 5.05 GiB already allocated; 0 bytes free; 5.23 GiB reserved in total by PyTorch)

@mp075496706
Copy link

I tested on three different video cards:

  • Rtx2060 (6G) ----- memory is out
  • Rtx3060ti (8G) ----- memory is out
  • Rtx3080ti (12G) ------ Perfect operation
    Therefore, I think it may be caused by insufficient memory of the graphics card.

@CaiCaiXian
Copy link

i use Rtx3060s(12G) ,but the same error still reported...
Is it possibly related to the preprocessing model(.pt file)? Should i delete them and download again?

@mp075496706
Copy link

i use Rtx3060s(12G) ,but the same error still reported... Is it possibly related to the preprocessing model(.pt file)? Should i delete them and download again?

I tested on the Rtx2060 (6G) video card again, and the modified parameter is: width_ After height=[256256], it can run, and the problem of video memory overflow will not be reported.
You can try to run it like this.

@CaiCaiXian
Copy link

i use Rtx3060s(12G) ,but the same error still reported... Is it possibly related to the preprocessing model(.pt file)? Should i delete them and download again?

I tested on the Rtx2060 (6G) video card again, and the modified parameter is: width_ After height=[256256], it can run, and the problem of video memory overflow will not be reported. You can try to run it like this.

Thank u, I closed some processes that occupied the GPU, thus I succeeded!

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

4 participants