DeepNude_NoWatermark_withModel
DeepNude_NoWatermark_withModel copied to clipboard
AssertionError: Torch not compiled with CUDA enabled
Processing input.png
libpng warning: iCCP: known incorrect sRGB profile
Executing phase: dress_to_correct
Executing phase: correct_to_mask
Traceback (most recent call last):
File "C:\Users\Aldy\deepnude\main.py", line 56, in
When i executing python main.py this error appear what should i do?
Ok i managed to get rid of this error, go to gan.py and go to line 117 then change netg.cuda(cpu[0])
to netg.cpu()
This is because you've most likely installed torch without CUDA enabled, in the readme.md package instillation segment it does not install Torch with CUDA enabled, you have to use the command line they recommend via the PyTorch website:
If you're using Windows and have PIP installed:
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Alternatively, go to their website and tailor the configuration accordingly: https://pytorch.org/get-started/locally/
Note:
You also need to do pip3 uninstall torch torchvision torchaudio
before installing the packages, as it will return you already having the package if you've installed the package previously without CUDA enabled.