VinAIResearch / HyperInverter

HyperInverter: Improving StyleGAN Inversion via Hypernetwork (CVPR 2022)
https://di-mi-ta.github.io/HyperInverter/
BSD 3-Clause "New" or "Revised" License
116 stars 13 forks source link

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

Open dinusha94 opened 6 months ago

dinusha94 commented 6 months ago

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 commented 6 months ago

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 commented 1 month ago

have you solved yet?

FORRYKIM commented 1 month ago

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