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

Add support for weight support of official stylegan2-ada #132

Closed
SystemErrorWang opened this issue Oct 10, 2020 · 4 comments
Closed

Add support for weight support of official stylegan2-ada #132

SystemErrorWang opened this issue Oct 10, 2020 · 4 comments

Comments

@SystemErrorWang
Copy link

Hello resinality, thank you for your implementation, it helped me a lot.
Current Nvidia released the official implementation of stylegan2-ada(https://github.com/NVlabs/stylegan2-ada), but when I was trying to convert the weight trained by this repo, I got the following error:

Traceback (most recent call last):
  File "convert_weight.py", line 220, in <module>
    generator, discriminator, g_ema = pickle.load(f)
  File "/mnt/wfs/mmcommwfssz/project_mm-base-vision/secretwang/stylegan2_weight_convert/dnnlib/tflib/network.py", line 297, in __setstate__
    self._init_graph()
  File "/mnt/wfs/mmcommwfssz/project_mm-base-vision/secretwang/stylegan2_weight_convert/dnnlib/tflib/network.py", line 154, in _init_graph
    out_expr = self._build_func(*self.input_templates, **build_kwargs)
  File "<string>", line 439, in G_synthesis
  File "<string>", line 392, in layer
  File "<string>", line 105, in modulated_conv2d_layer
  File "<string>", line 50, in apply_bias_act
TypeError: fused_bias_act() got an unexpected keyword argument 'clamp'

I would like to know if you would add support for converting the weight for the official implementation, thank you!

@rosinality
Copy link
Owner

rosinality commented Oct 10, 2020

I would have to look at this, but it seems like that it is error related to the official implementation. I think you need to start from stylegan2-ada repository so that checkpoint could be loaded in tensorflow.

@SystemErrorWang
Copy link
Author

Thank you for you quick reply, I will try to modify the code myself, thouch training script of the official repo works fine with me.

@rosinality
Copy link
Owner

Does model structure or variable naming is different from the original stylegan2? I thought it will be similiar or same.

@SystemErrorWang
Copy link
Author

@rosinality it seems to be the environment problem, I can convert the aboved mentioned model in another mechine with my modified codes. Thank you for you kind help!

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