Bringing-Old-Photos-Back-to-Life: RuntimeError: CUDA out of memory.
I get the following error:
RuntimeError: CUDA out of memory. Tried to allocate 88.00 MiB (GPU 0; 5.80 GiB total capacity; 4.14 GiB already allocated; 154.56 MiB free; 4.24 GiB reserved in total by PyTorch)
Is there a way to allocate more memory? I do not get why 4.14Gb are already allocated.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 20
- Comments: 21 (2 by maintainers)
I just ran into the same issue, for me it was - RuntimeError: CUDA out of memory. Tried to allocate 734.00 MiB (GPU 0; 10.74 GiB total capacity; 7.82 GiB already allocated; 195.75 MiB free; 9.00 GiB reserved in total by PyTorch)
I was able to fix with the following steps:
I would still love to be able to process full resolution pictures if anyone has a solution.
A simply walkaround is to reduce your image size > 640x480. Evenmore if you are trying to use ‘–with-scratches’ this will increase dramatically use of GPU memory. But it is a pitty to have to downscale your photo. With DeOldify it never happens.
first stage
Hello, we just redesign the network to support high-resolution images. Welcome to have a try. You can run the code with arguments:
You can also use 14GB of GPU in google colab: https://colab.research.google.com/drive/1NEm6AsybIiC5TwTU_4DqDkQO0nFRB-uA?usp=sharing#scrollTo=KvqDOPXnLmkl
same error: GPU: Titan X 12GB cuda memory,still not working input_image size :~1500 x ~ 2000 pixel collapse at stage 1 is it possible to modify some params to make it working?
@grenaud try to use NVtop, just to get a full view what is using your GPU and how much resource is using