-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Is it possible to generate using CPU? #105
Comments
You can convert the generator to float and then run with force_fp32=True: G = G.float() # convert weights that are half precision to fp32
img = G(z, c, force_fp32=True) # necessary to make sure intermediate casts to half aren't run If you want to avoid having to type that every time you can also override the forward method like this: import functools
G.forward = functools.partial(G.forward, force_fp32=True)
img = G(z, c) |
Look here for how to modify generate.py accordingly: |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I trained a custom model and was able to generate images using the above code. However, when I switch the device to CPU, I am faced with the following error:
RuntimeError: "slow_conv_transpose2d_out_cpu" not implemented for 'Half'
How can I fix it?
The text was updated successfully, but these errors were encountered: