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

Missing submodule? #39

Closed
MorganRO8 opened this issue Mar 15, 2021 · 2 comments
Closed

Missing submodule? #39

MorganRO8 opened this issue Mar 15, 2021 · 2 comments

Comments

@MorganRO8
Copy link

MorganRO8 commented Mar 15, 2021

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.

@MorganRO8 MorganRO8 changed the title Missing model.py? Missing submodule? Mar 15, 2021
@ThioJoe
Copy link
Contributor

ThioJoe commented Mar 15, 2021

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

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

DataStrategist added a commit to DataStrategist/ganspace that referenced this issue Mar 18, 2021
I noticed that after I created the environment, I was still in the base folder (I never came into the newly cloned folder), so adding that step. This resolves the "not a git" errors some people are complaining about, for example harskish#10 harskish#16 harskish#39
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