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

gen_video.py: how to enable force_fp32 = true? #59

Open
rqtqp opened this issue Nov 4, 2021 · 1 comment
Open

gen_video.py: how to enable force_fp32 = true? #59

rqtqp opened this issue Nov 4, 2021 · 1 comment

Comments

@rqtqp
Copy link

rqtqp commented Nov 4, 2021

The output of gen_video.py (screenshot from mp4 file with 2x2 grid):

image

While if I'm running vizualizer.py and enable Force FP32 option the output seems as it should be.

So my question is somehow possible to enable force_fp32 option for gen_video.py

Thanks.

@PDillis
Copy link

PDillis commented Nov 6, 2021

Looking at train.py, they set it like so:

c.G_kwargs.num_fp16_res = c.D_kwargs.num_fp16_res = 0  # for SynthesisNetwork
c.G_kwargs.conv_clamp = c.D_kwargs.conv_clamp = None  # for each SynthesisLayer

You can set these after loading G in any script (do it before a for loop so as to not waste resources):

G.synthesis.num_fp16_res = 0

for name, layer in G.synthesis.named_modules():
    if hasattr(layer, 'conv_clamp'):
      layer.conv_clamp = None
      layer.use_fp16 = False  # dunno if this is necessary, but it is an attribute; try with and without this

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