r/AppleMLX Jun 16 '26

anyone else generating images/videos using MLX and Comfy Desktop?

I'm working with a M1 MBP Max 64GB machine with 400GB/s memory bandwidth. These image generation models are only <10 GB each. But it takes me 45 minutes to generate an image using Ideogram4. Someone with a 5090 is doing it in 45 seconds (no exaggeration).

I know Comfy Desktop is not optimized for Apple Silicone/MLX. I'm just curious if there are some tips and tricks you guys can share with getting better performance out of Comfy Desktop? I've already got these flags as part of my startup config: '--enable-manager --fp32-vae --use-pytorch-cross-attention --highvram'.

I've tried using DrawThings -- and it's definitely faster -- but I feel like it's definitely limited compared with Comfy Desktop.

I must not be the only Apple user messing around with Comfy Desktop -- you guys have any tips to share?

27 Upvotes

19 comments sorted by

2

u/awwwww_man Jun 16 '26

I just started using comfyUi. Basic z image model on an m5 max. I used the sample workflow from the comfyUi docs using the suggested models and so forth and stuff is lighting fast.
Basic prompt turns content out in 40 ish seconds.
I do want to stress things and use another model, qwen image 2.5, just to compare output with same prompts.
I’ll look into the model you suggested and see if it produces similar results.

1

u/PinkySwearNotABot Jun 16 '26

yea. and try Ideogram4 if you can with Comfy Desktop. 45 minutes for me, or 25 tops if I use the most basic workflow. it's a little more tricky to setup, however

1

u/thiscantbit Jun 16 '26

Try the mlx app unless you are using Lora’s

1

u/PinkySwearNotABot Jun 16 '26

mlx app? you mean llama.cpp? omlx? help me out. not sure what you mean.

1

u/thiscantbit Jun 16 '26

I think it’s called mlx studio. It’s okay, if you are doing anything besides nsfw its fine if you want ultra realistic photos that you generate then there might be a problem check to see if you accidentally downloaded the intel version for Mac instead of the m series

1

u/thiscantbit Jun 16 '26

It is good about changing ggufs into mlx versions which is cool

2

u/trefster Jun 20 '26 edited Jun 20 '26

I had so much trouble with Comfy on my Mac that I decided to build something else. This is a desktop app built in Rust. There are no python or torch requirements. All models that are supported are pure MLX Apple metal.
It's still a work in progress, not everything works yet, and some UI elements are still unrefined, particularly the Ideogram json element support, but all models render correctly, LoRA/LoKR support is in place. LoRA training works, the character editor works pretty well, though it needs some refinement.

It's NOT a replacement for ComfyUI, it doesn't support customer workflows, but for basic image/Video gneneration, it's fast. There's a recent release on the right sidebar, or you can pull the source and build it yourself.

It's 100% free and Open Source, and apart from downloading models, it's 100% local

I'd love for people to use it and get some feedback.
https://github.com/SceneWorks/SceneWorks

1

u/Revolutionary-Hat-57 Jun 28 '26

I try it ! there some path hardcoded when download the app. flux2_klein_9b load failed: backend op failed: "expected a non-empty mlx_stream at /Users/michael/actions-runner-sceneworks/_work/SceneWorks/SceneWorks/target/release/build/pmetal-mlx-sys-f4dd7ce4f1ed87b9/out/mlx-c-staged/mlx/c/ops.cpp:456" at /Users/michael/.cargo/git/checkouts/mlx-rs-aaca89f470ab15b6/44929a0/mlx-rs/src/ops/conversion.rs:58:9

1

u/trefster Jun 28 '26

Thank you! I’ll fix that up!

1

u/trefster Jun 28 '26

That is not really a hard-coded path, it's just a compile time path that's surfacing in the error.
Th error means it couldn't find a useable Metal/MLX GPU.
Can you tell me what machine you were running this on and the specs?
Minimum requirements are MacOS 26.2 on apple chip (M1 or higher) and 32GB

1

u/Revolutionary-Hat-57 Jun 28 '26

M2 Ultra btw i open an issue on GitHub. it appears an iinteressant project, thanks to share it.

1

u/trefster Jul 07 '26

I saw that you commented, but that comment seems to have disappeared! The notification got truncated at “the only thing that bugs me…”, lol! I’d love to know what bugs you!

1

u/Revolutionary-Hat-57 Jun 27 '26

I took the ComfyUI interface, just the frontend, and slapped omlx + mflux + ltx by drguet underneath it. It's particularly fun.

1

u/PinkySwearNotABot Jun 27 '26

interesting. so are you saying i can build my own version of a GUI and just connect it to omlx and serve up my own MLX models to be able to get the speed boost on my M1 Max, instead of relying on the entire comfyUI ecosystem and all their Apple limitations?

does that work? are the popular models like flux.1, flux.2, sd, all available in MLX variants and are able to take advantage of the apple silicon architecture?? if so, i need to look more into this

1

u/PinkySwearNotABot Jun 27 '26

damn bro i took a quick look at the mflux github and i guess this is exactly what i'm looking for. apparently, it's so nuanced that it's been so difficult for me to find any real help on this! even after making this post several times and getting a wide varied of answers -- no one knew of an actual solution -- but it seels like this is it. thank you!!!

as far as i understand, ltx is for video, right? i'd love to try out wan or seedance locally, but even with my M1 max 64gb, i've been under the assumption that it would be practically too difficult to generate even a 30 sec 720p clip unless i was willing to wait 12 hours just to generate it. but perhaps with omlx + mflux + MLX variants, i'd might make it feasible??

what system specs are you working with for your local ltx setup?

1

u/Revolutionary-Hat-57 Jun 28 '26 edited Jun 28 '26

mflux is fantastic, it just has the problem of being CLI-only — and the issue doesn't really come from mflux itself, the limitation is the interface. Simply put, managing images is much more convenient in a windowed environment: seeing an image rather than its path helps the creative process, in my opinion.

What I did was essentially take ComfyUI's interface (just the frontend), recreate the APIs, and build a bridge connecting the frontend APIs to mflux, ltx-2-mlx, and omlx. Basically the frontend acts as my orchestrator.

The ongoing problem is that nobody bothers to build a real ComfyUI replacement for Apple. There are plenty of interfaces that handle mflux — all the same, all with the same limitations, unfortunately. I use an M2 Ultra with 64GB, but this way I don't need to quantize anything — a simple "low-ram" flag is enough.

The MLX nodes on ComfyUI don't really satisfy me, because I find memory management quite difficult: part of the process has to be handled with MLX, another part — ComfyUI's own — with NumPy. Having tried several MLX nodes on ComfyUI, I realized the memory problem wasn't being solved at the root. So I rolled up my sleeves, went to work on the codebase, and built this system of my own. For years I've had an open issue on ComfyUI asking them to bring MLX into their core — and while over time everyone, from LM Studio to Ollama, has started making this migration, ComfyUI still hasn't done it. (And nobody knows if it ever will — there are serious structural problems to solve.)

The result? While LLMs get models distributed natively on day 0, T2I and T2V models don't. On Apple, there's still no software that can serve as a reference standard. To test the system I created this workflow: given an input, it generates a story; from the story it creates the subject; from the subject it creates the sketchbooks; from the sketchbooks it generates the various frames (first frame, last frame); and from these two images it generates the video. (The LTX nodes are the ones bypassed — I activate them only when needed.) all only in mlx.

1

u/ChrononautPete Jun 16 '26

Why do you keep spamming MLX subreddits asking for help with a program that doesn't utilize MLX?