Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
c1a1o1 opened this issue Jan 23, 2022 · 1 comment
Open

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

c1a1o1 opened this issue Jan 23, 2022 · 1 comment

Comments

@c1a1o1
Copy link

c1a1o1 commented Jan 23, 2022

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants