yuval-alaluf / stylegan3-editing

Official Implementation of "Third Time's the Charm? Image and Video Editing with StyleGAN3" (AIM ECCVW 2022) https://arxiv.org/abs/2201.13433
https://yuval-alaluf.github.io/stylegan3-editing/
MIT License
660 stars 72 forks source link

SynthesisNetwork object has no attribute 'W2S' in StyleGAN3 statistic command #23

Closed Danielto1404 closed 2 years ago

Danielto1404 commented 2 years ago

Hi i'am trying to extract StyleGan3 statistics while running this command:

python editing/styleclip_global_directions/preprocess/s_statistics.py --checkpoint_path=model.pkl

but got this error:

raceback (most recent call last):
  File "editing/styleclip_global_directions/preprocess/s_statistics.py", line 100, in <module>
    main()
  File "/home/jovyan/.imgenv-cuda-0/lib/python3.7/site-packages/pyrallis/argparsing.py", line 158, in wrapper_inner
    response = fn(cfg, *args, **kwargs)
  File "editing/styleclip_global_directions/preprocess/s_statistics.py", line 96, in main
    save_stats(G, args.random_state, args.num_images, args.truncation_psi, args.truncation_cutoff, args.output_path)
  File "editing/styleclip_global_directions/preprocess/s_statistics.py", line 47, in save_stats
    all_s = G.synthesis.W2S(ws)
  File "/home/jovyan/.imgenv-cuda-0/lib/python3.7/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError:  'SynthesisNetwork' object has no attribute 'W2S'

Can't figure out what am i doing wrong, because according to your code SynthesisNetwork class got method named W2S.

Any thoughts what am i doing wrong? Thank you.