jina-ai / discoart

🪩 Create Disco Diffusion artworks in one line
Other
3.84k stars 247 forks source link

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

Open x011 opened 1 year ago

x011 commented 1 year ago

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?

mlew980 commented 1 year ago

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 commented 1 year ago

I tested on three different video cards:

CaiCaiXian commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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!