harskish / ganspace

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

Missing submodule? #39

Closed MorganRO8 closed 3 years ago

MorganRO8 commented 3 years ago

Hey guys,

I've been trying to play with this and I've been running into an error after installation when I'm trying to start the interactive.py. I did see the other listing with the same-ish issue, however there are no files in stylegan-pytorch to copy elsewhere, so I'm not sure what I'm missing. The error traceback is as follows:

(ganspace) C:\Users\pixlo\Documents\ganspace-master>python interactive.py --model=BigGAN-512 --class=husky --layer=generator.gen_z -n=1_000_000 Traceback (most recent call last): File "interactive.py", line 22, in from models import get_instrumented_model File "C:\Users\pixlo\Documents\ganspace-master\models__init.py", line 11, in from .wrappers import * File "C:\Users\pixlo\Documents\ganspace-master\models\wrappers.py", line 23, in from . import stylegan2 File "C:\Users\pixlo\Documents\ganspace-master\models\stylegan2\init__.py", line 14, in from model import Generator ModuleNotFoundError: No module named 'model'

As far as I can tell this is because there is a missing model.py that is present in the stylegan folder but not the stylegan2 folder, however copying the one over to the other doesn't change anything. It may as well be that I'm missing something, python isn't my strong suit. Any suggestions?

Thanks,

-Morgan

Edit: I deleted and re-extracted the folder from the master and I noticed that I'm now getting the error: (ganspace) C:\Users\pixlo\Documents\ganspace-master>git submodule update --init --recursive fatal: not a git repository (or any of the parent directories): .git

I imagine this is the real issue, as it seems the subdirectories are tied to whatever I'm missing.

ThioJoe commented 3 years ago

It might be the same problem I encountered, which was the result of the working folder not being recognized by git as a repository. I just downloaded the files through the browser.

Try creating a new empty folder, then while in it with command prompt, use the "git clone [url]" which should download it all along with other stuff that must be necessary, and then when I went through the steps again, it all worked.

harskish commented 3 years ago

Yes, this is related to downloading the sources as a zip instead of cloning with git. The instructions have been clarified.