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

Full bf16 support #628

Merged
merged 2 commits into from
Jul 9, 2023
Merged

Full bf16 support #628

merged 2 commits into from
Jul 9, 2023

Conversation

KohakuBlueleaf
Copy link
Contributor

full fp16 will cause some unstable problem.
And if the GPU support bf16, use full bf16 will be better (bf16 weight + bf16 amp + bf16 grad)
The only problem of this thing is, if user want to use optimizer in the bitsandbytes, they will need the newest version to utilize full bf16 training.
Which is bad nes for windows user. (or we need to compile the newest bitsandbytes for windows, which could be tricky)

so just a tiny start for a useful feature, need more improvement. (like check if the gpu support bf16, if the bitsandbytes support bf16 grad ...)

@kohya-ss
Copy link
Owner

kohya-ss commented Jul 9, 2023

Thank you for this!

There are some concerns as you wrote, I don't see a problem to implement this as an experimental feature.

It is unfortunate that bitsandbytes does not work on Windows, but it would be possible to use another optimizer.

@kohya-ss kohya-ss merged commit 3579b45 into kohya-ss:sdxl Jul 9, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants