harskish / ganspace

Discovering Interpretable GAN Controls [NeurIPS 2020]
Apache License 2.0
1.78k stars 264 forks source link

Model "NoneType" #40

Open caleb-severn opened 3 years ago

caleb-severn commented 3 years ago

Sorry if I'm missing something really obvious. I get this error when running interactive.py

File "interactive.py", line 644, in setup_model() File "interactive.py", line 153, in setup_model load_components(class_name, inst) File "interactive.py", line 57, in load_components dump_name = get_or_compute(config, inst) File "C:\Users\caleb\ganspace-master\decomposition.py", line 368, in get_or_compute return _compute(submit_config, config, model, force_recompute) File "C:\Users\caleb\ganspace-master\decomposition.py", line 387, in _compute config.outputclass.replace(' ', ''), AttributeError: 'NoneType' object has no attribute 'replace'

Looking into it, the config.output_class is being returned as a Nonetype? I tried to just forcing it to read it as a string but that didn't fix it, so there seems to be some underlying output_class error?

All the dependencies installed correctly in its environment, and everything else seems to run fine!

kunwar-vikrant commented 3 years ago

facing the same issue!

kunwar-vikrant commented 3 years ago

you can replace output types as one of #[ffhq, celebahq, bedrooms, cars, cats, vases, wikiart, fireworks, abstract, anime, ukiyo-e] in config.py and then run , it will work

caleb-severn commented 3 years ago

you can replace output types as one of #[ffhq, celebahq, bedrooms, cars, cats, vases, wikiart, fireworks, abstract, anime, ukiyo-e] in config.py and then run , it will work

Sorry in Config the only thing IM seeing that has output_class is line 58 dest = 'output_class'. Are you saying put [ffhq, celebahq, bedrooms, cars, cats, vases, wikiart, fireworks, abstract, anime, ukiyo-e] in default? Or in type = ? Sorry I'm not very good at this!

kunwar-vikrant commented 3 years ago

@caleb-severn if you go to config.py line #58 - parser.add_argument('--class', dest='output_class', type=str, default=None, help='Output class to generate (BigGAN: Imagenet, ProGAN: LSUN)')

Here type parameter is set as none .....you can replace it with one of the values in the list [ffhq, celebahq, bedrooms, cars, cats, vases, wikiart, fireworks, abstract, anime, ukiyo-e] like for eg. you can set type = ffhq.

PS:If you are running windows 10 , try this repo : https://github.com/justinjohn0306/StyleFlow-Windows-10