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

RuntimeWarning: overflow encountered in cast v.numpy().astype("float16").tofile(output_bin_file) #408

Open
mansoorvm opened this issue Jun 6, 2024 · 3 comments

Comments

@mansoorvm
Copy link

Got following warning when converting model

E:\Project\AiTheme\convert.py:42: RuntimeWarning: overflow encountered in cast
v.numpy().astype("float16").tofile(output_bin_file)

@codezjx
Copy link

codezjx commented Jun 7, 2024

+1, same error on MacOS, using the runwayml/stable-diffusion-v1-5 ckpt file.

@SagiHatzabi
Copy link

+1, same error on MacOS RuntimeWarning: overflow encountered in cast v.numpy().astype("float16").tofile(output_bin_file)

@ShiftHackZ
Copy link

I faced the same error on Arch Linux, with Intel Core i9 10th gen CPU:

Tried this models.

To avoid this error, I changed float16 type to float32 type in convert.py script like this:

v.numpy().astype("float32").tofile(output_bin_file)

After patching type in the convert.py script, all 3 models converted without issues.

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

4 participants