yinboc / liif

Learning Continuous Image Representation with Local Implicit Image Function, in CVPR 2021 (Oral)
https://yinboc.github.io/liif/
BSD 3-Clause "New" or "Revised" License
1.25k stars 144 forks source link

Met with cuda out of memory when I am testing the model #33

Open Patricia1019 opened 3 years ago

Patricia1019 commented 3 years ago

bash scripts/test-div2k.sh save/_train_edsr-baseline-liif/epoch-last.pth 0 then I met with RuntimeError: CUDA out of memory. Tried to allocate 676.00 MiB (GPU 0; 10.92 GiB total capacity; 827.98 MiB already allocated; 478.50 MiB free; 830.00 MiB reserved in total by PyTorch) how to solve this problem?

sangjun04 commented 3 years ago

try reducing the batch size.

xuejiancai commented 3 years ago

i met the same error(cuda oom) when test rdn-liif. did you solve this problem?

Lovegood-1 commented 2 years ago

I have 4 GPU. But when I run code on GPU:2 ,I run this 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 2560,1440 --output output.png --gpu 0' and get 'cuda out of memory'. Than I try 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 1440,2560 --output output.png --gpu 2'. It work!!!

Irina51244 commented 1 year ago

try reducing the batch size.

I tried to reduce the batch size to 1, but it didn't work.

Irina51244 commented 1 year ago

I have 4 GPU. But when I run code on GPU:2 ,I run this 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 2560,1440 --output output.png --gpu 0' and get 'cuda out of memory'. Than I try 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 1440,2560 --output output.png --gpu 2'. It work!!!

I set the number of GPU to '1', but it still used GPU'0'. RuntimeError: CUDA out of memory. Tried to allocate 4.46 GiB (GPU 0; 11.00 GiB total capacity; 6.84 GiB already allocated; 1.27 GiB free; 7.97 GiB reserved in total by PyTorch)