-
Notifications
You must be signed in to change notification settings - Fork 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
Use UNet precision, add --upcast-sampling
support
#143
Conversation
Looks good. Will do some test later |
Confirm works on M1 Pro and M1. But the result is weird: Looks like something was upscaled inproperly |
Just tested on MacOs M1 Pro, can't see any issues and it runs super smooth now. Thanks for the hard work on this! |
Hmm.. any screenshots? Maybe I misconfigured something on my MacBook. |
Haven't tested the other models yet, maybe there's issues with those. |
Looks nice. Note that MPS support is experimental, feel free to open issue if you have any questions. |
I’m going to guess that it has something to do with the PyTorch version; I’m using nightly builds (from February 10 currently; see AUTOMATIC1111/stable-diffusion-webui#7453 for the webui-user.sh file with the exact configuration). In the near future I plan to have PyTorch 2.0 set as the default version for Macs running web UI anyway, so any PRs I submit here for MPS will be intended to be used with that webui-user.sh configuration. |
Error recall this problem ,i dont know why |
This will fix Macs needing
--no-half
(by adding dtype casting for--upcast-sampling
) but also has a significant change - currently the ControlNet models appear to be loaded with full precision by default, this PR changes the precision to match the UNet precision of the loaded model in web UI. Unless there is something I'm missing, this change should significantly reduce VRAM usage for all users that aren't using--no-half
.Fixes #87, fixes #68.