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

AssertionError: Torch not compiled with CUDA enabled #32

Closed
drprajapati opened this issue Jan 20, 2020 · 6 comments
Closed

AssertionError: Torch not compiled with CUDA enabled #32

drprajapati opened this issue Jan 20, 2020 · 6 comments

Comments

@drprajapati
Copy link

drprajapati commented Jan 20, 2020

(base) PS E:\darshan\pytorch_stylegan_encoder-master\InterFaceGAN> python generate_data.py -m stylegan_ffhq -o data/pggan_celebahq -n 10000
[2020-01-20 03:53:48,282][INFO] Initializing generator.
[2020-01-20 03:53:48,521][WARNING] No pre-trained model will be loaded!
Traceback (most recent call last):
File "generate_data.py", line 111, in
main()
File "generate_data.py", line 64, in main
model = StyleGANGenerator(args.model_name, logger)
File "E:\darshan\pytorch_stylegan_encoder-master\InterFaceGAN\models\stylegan_generator.py", line 42, in init
super().init(model_name, logger)
File "E:\darshan\pytorch_stylegan_encoder-master\InterFaceGAN\models\base_generator.py", line 103, in init
self.model.eval().to(self.run_device)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 426, in to
return self._apply(convert)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 224, in apply
param_applied = fn(param)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 424, in convert
return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\cuda_init
.py", line 192, in _lazy_init
check_driver()
File "C:\Users\HpZ8\Anaconda3\lib\site-packages\torch\cuda_init
.py", line 95, in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

@sandhyalaxmiK
Copy link

sandhyalaxmiK commented Jan 21, 2020

Have downloaded stylegan_ffhq model (karras2019stylegan-ffhq-1024x1024.pkl ) from stylegan github and placed in models/pretrain folder ??

Once check whether executing or not by adding pretrained model into the folder.
If still getting error, once look into the following issue pytorch/pytorch#3717

@drprajapati
Copy link
Author

drprajapati commented Jan 21, 2020

Thank you for your reply...Yes that error is solved...!!
Can i train this on my own image dataset ?
I am new to GAN your help will be very beneficial for me..!!

@sandhyalaxmiK
Copy link

First you train your image dataset with stylegan model, get pre-trained weights of your model, and keep this pretrained model in models/pretrain directory. and then do training...

@drprajapati
Copy link
Author

Okay ma'am... Thank you ma'am...
I tried several stylegan repository but i got error... Do you know about the ideal stylegan code ?

@sandhyalaxmiK
Copy link

sandhyalaxmiK commented Jan 21, 2020

https://github.com/NVlabs/stylegan This is the official repository which i am using.
The process of training custom images with official stylegan github is explained in the below video https://www.youtube.com/watch?v=QBUFrep8ljI

@drprajapati
Copy link
Author

Thank you so much ma'am...👏

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

3 participants