RenYurui / PIRender

The source code of the ICCV2021 paper "PIRenderer: Controllable Portrait Image Generation via Semantic Neural Rendering"
Other
514 stars 65 forks source link

AttributeError: 'Config' object has no attribute 'device' #20

Open c1a1o1 opened 2 years ago

c1a1o1 commented 2 years ago

F:\ProgramData\Anaconda3\python.exe F:/work/mingxingshipin/test/PIRender-main/intuitive_control.py --config ./config/face_demo.yaml --name face --no_resume --output_dir ./vox_result/face_intuitive --input_name ./demo_images Make folder result\face 2022-01-23 20:13:22.076873: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll Traceback (most recent call last): File "F:/work/mingxingshipin/test/PIRender-main/intuitive_control.py", line 87, in = get_model_optimizer_and_scheduler(opt) File "F:\work\mingxingshipin\test\PIRender-main\util\trainer.py", line 46, in get_model_optimizer_and_scheduler net_G = network(**opt.gen.param).to(opt.device) AttributeError: 'Config' object has no attribute 'device'

aminesoulaymani commented 2 years ago

I got this bug when using the --single-gpu flag. I juste added : opt.device = torch.cuda.current_device() I got another bug about local_rank, I just added: opt.distributed = False