-
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
MPS keeps crashing #68
Comments
Getting the same error when I use any model
|
You can get it working if you use --no-half, but it's obviously a lot slower and uses a lot more memory. Hoping for a solution to this, the tool looks really cool. |
my Web UI launches with the argument: --no-half-vae, does that have a different effect than --no-half? |
Yeah, I still get the tensor size mismatch with --no-half-vae, only --no-half fixes it. I'm not the most knowledgable on pytorch, but I believe that the issue is when you try to do an operation with a tensor of type float16 and a tensor of size float32. --no-half forces everything to use float32 and fixes the issue, but at a significant cost to performance. |
Hmm, --no-half unfortunately doesn't fix it for me. I get a whole different set of errors. |
Interesting... mind posting them and your system specs? |
Sure, systems specs are Mac Studio M1 Ultra Running Ventura 13.1
0%| | 0/20 [00:00<?, ?it/s]
|
Hmm. I wonder if we might be running different versions of pytorch. Are you using the mac-specific build discussed here? I recommend using it even though it doesn't resolve this issue, since it provides a ~25% speed boost on MPS. |
I was not running that mac-specific build. Thanks for tipping me to that resource. I'm installing now and will try ControlNet again to see if get the same error. |
Unfortunately, still running into the same errors even after updating to the mac-specific build. 🤷♂️ |
Hmm. When you launch, do you use webui.sh? |
Yes |
And you've pulled the latest Automatic update & sd-webui-controlnet update, correct? Just trying to figure out what could be different in our setup. |
Wow, ok I did need to update ControlNet and it's working with --no-half. Thank you! |
No worries! Glad it helped. Hopefully we can get a solution that allows us to use float16 |
With the command line arg --opt-sub-quad-attention and --no-half it runs about twice as fast for me (7-8s/it vs 20s/it). Still terrible but a bit better. |
Yes, float16 doesn’t work correctly with MPS on this extension yet. I will try to fix that but I can’t make any guarantees at this point. First though I want to fix the normal and depth map preprocessors returning bad/inconsistent results on MPS. |
Sounds good. I'll take a look after work and see if I can debug. |
I'm also running a Mac Studio M1 Ultra Running Ventura 13.1 and have got the latest versions of everything - Automatic1111, Controlnet, Python, et al. Have applied the suggested fixes that have worked for Philbuck84 as per above but Python still keeps crashing on trying to render using Controlnet every time, with the exact same error warning resulting in the message ending in "There appear to be 1 leaked semaphore objects to clean up at shutdown |
I can confirm now that it is working for me after adding --no-half to the web-user.sh file, COMMANDLINE_ARGS line. |
For unknown reason, from today, I kept getting the crashing again. It was working find for many weeks and suddenlty.... Loading preprocessor: none |
If I use the diff_openpose model, it's working. But the more recent one keeps crashing my webUI automatic1111. |
I got the ControlNet extension loading fine, but it keeps on crashing when I use scribble:
The text was updated successfully, but these errors were encountered: