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

Underflow when saving LoRa as fp16 #93

Closed
IdiotSandwichTheThird opened this issue Jan 21, 2023 · 2 comments
Closed

Underflow when saving LoRa as fp16 #93

IdiotSandwichTheThird opened this issue Jan 21, 2023 · 2 comments

Comments

@IdiotSandwichTheThird
Copy link

--save_precision=fp16 will cause a lot of 0's in lora modules.
--save_precision=float seems to work fine.

@kohya-ss
Copy link
Owner

kohya-ss commented Jan 22, 2023

Thank you for this!
I found an issue in the check_lora_weights.py. The script showed 0.0 for some layers even if the weights are trained, because of the overflow in torch.mean. Sorry for that.

I've fixed the issue, and the script now shows a proper result.

However, I think there is the underflow issue yet, described in kohya-ss/sd-webui-additional-networks#49. I am working on the issue, and will fix sooner.

@IdiotSandwichTheThird
Copy link
Author

Thank you for the hard work!

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