jiupinjia / stylized-neural-painting

Official Pytorch implementation of the preprint paper "Stylized Neural Painting", in CVPR 2021.

Home Page:https://jiupinjia.github.io/neuralpainter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to solve this problem

Arabeseque opened this issue · comments

D:\BaiduNetdiskDownload\Stylized Neural Painting Main\Stylized Neural Painting>python demo.py --img_path ./test_images/sunflowers.jpg --c
anvas_color 'white' --max_m_strokes 500 --m_grid 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush --outpu
t_dir ./output
Traceback (most recent call last):
  File "demo.py", line 4, in <module>
    torch.cuda.current_device()
  File "C:\Users\12100\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\cuda\__init__.py", line 366, in current_device
    _lazy_init()
  File "C:\Users\12100\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\cuda\__init__.py", line 166, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Hi @Rabesque, thanks for your feedback. It seems that your Pytroch was not correctly installed with proper Cuda backend support. Also, the code you're using seems pretty old and is far behind the latest committed version of this repo. You can try to update your code by git clone https://github.com/jiupinjia/stylized-neural-painting.git , and see if the problem can be solved.