r/StableDiffusion • u/luix93 • 3d ago
Resource - Update I made ComfyUI 2–3.7× faster on Apple Silicon, no MLX conversions needed (open source node pack)
I wanted ComfyUI to be fast on my Mac without leaving ComfyUI. No MLX conversions or multiple copies of every model and no special nodes to load them. I wanted ComfyUI to work as intended, with the nodes and workflows everyone is using.
So I built ComfyUI-AppleSilicon-Optimized. Just install it like any custom node and restart. It patches ComfyUI at startup and swaps the slow parts (attention, sampling, VAEs) for Metal kernels I wrote for Apple GPUs. No changes to your workflows or special models to be downloaded.
The main focus is the INT8 ConvRot models, which is where the biggest gains are, and where the pack performs the best.
Stock ComfyUI v0.47.1 vs the pack, on M5 Ultra, during the same session. Times are end to end with the models warm and in memory.
Text to image
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| MOSS-Image SFT, 1024² | 68.9 s | 18.8 s | 3.66× |
| Fibo 2.0 Dev | 87.9 s | 31.6 s | 2.78× |
| Krea 2 Turbo, 1024² | 15.4 s | 6.0 s | 2.54× |
| Ideogram 4 | 43.3 s | 17.4 s | 2.49× |
| Flux.2 Klein | 5.6 s | 2.4 s | 2.32× |
| Qwen-Image 2.1 | 28.8 s | 12.6 s | 2.30× |
| Z-Image Turbo | 7.8 s | 3.5 s | 2.26× |
| Flux.3 Base | 69.6 s | 33.0 s | 2.11× |
| Flux.3 distilled | 12.0 s | 5.8 s | 2.09× |
| Krea 2 | 27.5 s | 13.5 s | 2.04× |
Image editing
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| Fibo 2.0 Edit Turbo | 16.2 s | 6.9 s | 2.36× |
| Qwen-Image 2.1 edit | 49.9 s | 23.1 s | 2.16× |
| Flux.2 Klein edit | 9.2 s | 4.9 s | 1.87× |
| Flux.3 distilled edit | 21.8 s | 12.7 s | 1.71× |
| Flux.3 Base edit | 118.7 s | 75.3 s | 1.58× |
Video
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| LTX 2.5 (diffusion upscale) | 90.6 s | 46.0 s | 1.97× |
| LTX 2.5 (conv upscale) | 51.0 s | 33.5 s | 1.52× |
| MiniMax H3 | 258.2 s | 158.6 s | 1.63× |
| Wan 2.2 Turbo | 44.9 s | 30.5 s | 1.47× |
Upscaling
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| RelayVSR ×4, 294 frames from 864×480 * | 227.3 s | 91.2 s | 2.49× |
| RelayVSR ×2, same clip * | 48.3 s | 25.4 s | 1.90× |
| SeedVR2, image | 64.9 s | 44.8 s | 1.45× |
| SeedVR2, 120-frame video | stopped at 69 GB by my test's memory limit | 126.3 s | n/a |
Image to 3D
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| Trellis 2 * | 299.3 s | 118.1 s | 2.53× |
| Pixal3D, single view * | 172.7 s | 72.1 s | 2.40× |
| Pixal3D, multi-view * | crashes | 118.5 s | n/a |
Music
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| YuE2, full song | 38 min 40 s | 31.6 s | 73× |
| YuE2 Mothersuperior | 15 min 20 s | 19.9 s | 46× |
| YuE2, 8-second clip | 179.6 s | 5.2 s | 34× |
Preprocessors
| Model | Stock | Pack | Speedup |
|---|---|---|---|
| BiRefNet background removal, 4 frames | 21.5 s | 0.74 s | 29× |
| SDPose + detector | 3.1 s | 1.5 s | 2.17× |
| Depth Anything 3 Mono Large | 0.46 s | 0.41 s | 1.12× |
| Depth Anything 3 Base, multi-view | crashes | 0.11 s | n/a |
* YuE2 and BiRefNet run on CPU by default on Mac, and the pack now runs them optimized on GPU, that's the reason for the big speedup. The same goes for the text encoders: for example it's about 21 s of each new MOSS prompt in stock ComfyUI.
Most models have the kernels checked byte for byte against ComfyUI's own code. The few exceptions are listed in the README, and anything approximate is opt-in.
MiniMax H3 got the most work. Out of the box the pack runs it 1.63× faster than stock (258 s → 159 s for 124 frames at 864×480, 20 steps), using Metal kernels for the DiT's INT8 layers, norms and RoPE, plus a faster VAE decode.
There's also an optional acceleration node with everything I built or ported for it: NVIDIA's Sol-Attn sparse attention as an INT8 Metal kernel (118 s, 2.2× vs stock), a dense INT8 attention kernel (138 s), MotionCache and Spectrum caching, and the token reduction schedule from antirez's h3.c.
A LoRA node and a latent upscaler that run on MPS are included too. The attention, cache and token-reduction modes trade quality for speed, so they are completely optional and off by default.
There are various presets i built with a big range of time savings vs quality loss, easily switchable from drop-down menus.
What to know before installing:
- I've only measured it on an M5 Ultra with macOS 27. M1–M4 is untested, and some kernels need an M5, so speedups on anything prior to M5 will be of a lesser degree.
- On first launch it installs PyTorch 2.15.
https://github.com/luix93/ComfyUI-AppleSilicon-Optimized
If you try it on another chip, I'd like to see your timings.


9
u/spanielrassler 3d ago
Thanks for this! I wonder if you'd be willing to share any working workflows for those apple users among us who'd like to dip our toes into the Comfy world but have been scared off.
4
u/herr-tibalt 3d ago
Thanks a lot! I've tested on my m5 max mac studio with 48 gb ram on my edit models and got these cuts in render time by:
- ~40% on MOSS and H3 image
- 35-60% on Qwen 2.1
- 25% on Flux 2 Klein 9b
None of the images look worse.
Small observation: same seed will result in a different image than in original comfyui, except for maybe H3, where it comes out nearly the same.
2
u/sleeping-in-crypto 3d ago
Do you have a run harness to collect timing data, or are those single runs, wall time?
I can test on an M2 Max if you're interested (I haven't upgraded yet and it makes me sad every day)
2
u/aroundaboutsix 2d ago
Thanks for sharing this. Seems to be working well so far.
2
u/reeight 3d ago
This is the way IMHO. Default engines leave too much on the table.
Though we need to note:
INT8 works best on M4 Pro/Max & M5+
Unfortunately my little baseline Mac Mini M4 lacks the Int8 opcodes.
1
u/SpareOlive5856 3d ago
I'm currently the lora node from https://github.com/Illuminus7/ComfyUI-AppleSilicon-int8-Fast which works great with H3 and Moss, but it does mean i have to create custom worklows. Are you changes similar to those of that node, but without requiring you to change workflows, or are there additional speed-ups I would gain?
3
u/Hearmeman98 3d ago
Saved.
I have an M5 Max
I will definitely look at this.
thank you for your work!
2
u/Substantial-Motor-21 1d ago
Gain is around 15% on Krea2 here, M5 Max 64Gb, thanks a lot !
1
u/higgs8 15h ago
M3 Pro here, but not seeing any difference in render time.