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

ModuleNotFoundError: No module named 'dnnlib.tflib' #12

Open
dinusha94 opened this issue May 13, 2024 · 3 comments
Open

ModuleNotFoundError: No module named 'dnnlib.tflib' #12

dinusha94 opened this issue May 13, 2024 · 3 comments

Comments

@dinusha94
Copy link

Hi, I am getting the following error when try to run the inference script, I did complete all the installation steps without an error

Traceback (most recent call last):
  File "scripts/inference.py", line 91, in <module>
    run()
  File "scripts/inference.py", line 34, in run
    net = HyperInverter(opts)
  File "./models/hyper_inverter.py", line 58, in __init__
    self.load_weights()
  File "./models/hyper_inverter.py", line 99, in load_weights
    ckpt = pickle.load(f)
ModuleNotFoundError: No module named 'dnnlib.tflib'
@dinusha94
Copy link
Author

This issue is fixed whith dnnlib installation, now I get following error

Traceback (most recent call last):
  File "scripts/inference.py", line 95, in <module>
    run()
  File "scripts/inference.py", line 38, in run
    net = HyperInverter(opts)
  File "./models/hyper_inverter.py", line 58, in __init__
    self.load_weights()
  File "./models/hyper_inverter.py", line 100, in load_weights
    ckpt = pickle.load(f)
  File "/home/usr_9110799_ulta_com/miniconda3/envs/stylegan2/lib/python3.7/site-packages/dnnlib/tflib/network.py", line 279, in __setstate__
    assert state["version"] in [2, 3]
AssertionError

@FORRYKIM
Copy link

have you solved yet?

@FORRYKIM
Copy link

solved, put folder "dnnlib" from stylegan2 to present path

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