[Issue]: Random _MTLCommandBuffer on Mac M1
Issue Description
Everything seems to work well a lot of the time and then suddenly I'll run into a few of these errors in a row which shuts down python completely and I'm forced to start the server over:
Base-[_MTLCommandBuffer addScheduledHandler:]:787: failed assertion `Scheduled handler provided after commit call'
Sometimes it happens mid generation of an image sometimes before it has a chance to start at all. Any ideas?
The code below shows the --upgrade tag - that was me trying to see if there was a fix or new build that would have addressed the issue already.
Version Platform Description
App Version: app=sd.next updated=2025-07-06 hash=d5d857aa branch=master
Python: version=3.10.17
Machine: Mac M1 Max with 64GB of RAM running Sequoia 15.4.1 (24E263)
Browser: Chrome usually, Firefox as an alt
Relevant log output
Starting SD.Next
11:31:20-869309 INFO Logger: file="/Users/xxxx/sdnext/sdnext.log"
level=INFO host="MacBook-Pro.local"
size=729593 mode=append
11:31:20-870255 INFO Python: version=3.10.17 platform=Darwin
bin="/Users/xxxxx/sdnext/venv/bin/python3"
venv="/Users/xxxxx/sdnext/venv"
11:31:20-977038 INFO Version: app=sd.next updated=2025-07-06 hash=d5d857aa
branch=master
url=https://github.com/vladmandic/sdnext/tree/master
ui=main
11:31:21-781226 INFO Version: app=sd.next latest=2025-07-06T00:17:54Z
hash=d5d857aa branch=master
11:31:21-795829 INFO Platform: arch=arm64 cpu=arm system=Darwin
release=24.4.0 python=3.10.17 locale=('en_CA', 'UTF-8')
docker=False
11:31:21-798725 INFO Args: ['--upgrade']
11:31:21-946377 INFO Install: verifying requirements
11:31:21-950158 INFO Startup: standard
11:31:21-950605 INFO Verifying submodules
11:31:51-316383 INFO Extension installed packages: sd-webui-faceswaplab
['numpy==2.2.6']
11:31:51-317328 INFO Extensions enabled: ['sd-extension-chainner',
'sdnext-modernui', 'stable-diffusion-webui-rembg',
'sd-webui-agent-scheduler', 'sd-extension-system-info',
'sd-webui-faceswaplab']
Backend
Diffusers
Compute
DirectML
UI
ModernUI
Branch
Master
Model
Other
Acknowledgements
- [x] I have read the above and searched for existing issues
- [x] I confirm that this is classified correctly and its not an extension issue
_MTLCommandBuffer is deep inside Apple's metal framework, that is several layers from SD.Next.
If I'd had to guess, issue is between torch with MPS support and Sequoia, but really cannot offer anything more than.
Appreciate the response. I'll keep looking and post back if I find anything - Love the work you've done on this BTW - If I can get it working properly I love the amount of customization it offers over automatic1111 alone, I still have so much to learn it would seem. I had no idea there was so much to tune and adjust and I didn't consider myself a newb ... until now - :) I'm hoping to get an additional platform to better run this sort of thing - so hopefully the MTL issue won't be a hassle for me soon.
I get a repro of this 100% of the time. Brand new install on my M3 Max MBP, python 3.10.18, Sequioa 15.5. Haven't been able to generate a single image yet 8-/.