lucidrains / DALLE2-pytorch

Implementation of DALL-E 2, OpenAI's updated text-to-image synthesis neural network, in Pytorch
MIT License
11.17k stars 1.09k forks source link

Cuda Out Of Memory #247

Open hkadir24 opened 2 years ago

hkadir24 commented 2 years ago

Hello,

When I am feeding images to the decoder (which is 2nd step of training) Cuda Runs Out of Memory. How can i resolve this?

GPU: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 516.94 Driver Version: 516.94 CUDA Version: 11.7 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 Off | N/A | | N/A 44C P8 3W / N/A | 217MiB / 4096MiB | 1% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 6020 C+G ...cw5n1h2txyewy\LockApp.exe N/A | | 0 N/A N/A 9352 C+G ...e\PhoneExperienceHost.exe N/A | | 0 N/A N/A 21632 C+G ...5n1h2txyewy\SearchApp.exe N/A | | 0 N/A N/A 22508 C+G ...\app-1.0.9006\Discord.exe N/A | | 0 N/A N/A 23876 C+G ...artMenuExperienceHost.exe N/A | | 0 N/A N/A 24972 C+G ...Docker\Docker Desktop.exe N/A | | 0 N/A N/A 32224 C+G ...p-0.4.7\Postman Agent.exe N/A | | 0 N/A N/A 36124 C+G ...ontend\Docker Desktop.exe N/A | | 0 N/A N/A 39840 C+G ...zpdnekdrzrea0\Spotify.exe N/A | | 0 N/A N/A 43884 C+G ...2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 45168 C+G ...5n1h2txyewy\SearchApp.exe N/A | | 0 N/A N/A 49656 C+G ...kyb3d8bbwe\Calculator.exe N/A | | 0 N/A N/A 91264 C+G ...icrosoft VS Code\Code.exe N/A | | 0 N/A N/A 123876 C+G ...4.0.4.0\GoogleDriveFS.exe N/A | | 0 N/A N/A 155692 C+G ...5n1h2txyewy\SearchApp.exe N/A | +-----------------------------------------------------------------------------+

Jorginthesage commented 1 year ago

I can confirm on Windows 10 and MacOS Catalina that removing the *.cuda() fixed this error on my computers.