Possible Optimizations #550
Replies: 13 comments 1 reply
|
Hi @azrahello! Upscaling is interesting for sure and should be something we should support! Thanks for linking the ControlNet one, I will look into this to get a sense of how much work it would take to implement... Depending on a few personal factors, I might be able to spend more time than typical on MFLUX over the coming time so I am really happy with your feature suggestions here :) TeaCache looks awesome, definitely worth investigating! On their site, they have an example to get a sense of the quality degradation, and that looks really promising. Would you say with your own testing that you got similary good results, or do they vary a lot? Anyway, really cool! |
|
Hi! Still in the same field, I also found this node: Comfy-WaveSpeed, which in the README refers to this: ParaAttention. I’m not sure if they do the same thing, but while teacache works for me with GGUF, these others don’t. Also, I saw that MLX Explore released this: “Support loading F8_E4M3 from safetensors”, which is a request I often see in nodes for loading the Flux model in ComfyUI (but it’s not usable because it requires too many resources). Maybe this could be useful for you? For me, it’s totally out of reach! :P |
|
@azrahello Hi! Thanks for the pointers, I have not seen these before and your great suggestions are always welcome :) I remember I tried the tea-cache technique a while back but did not give it enough time to properly evaluate it and put it on hold for now. It also felt a bit "hackish" with a few magic numbers in the implementation that made me a bit suspicious..., but can be worth revisiting. For First Block Cache, it looks like they claim it is even simpler than TeaCache which sounds promising. I'll put this on the reading list and revisit after finishing up the 0.6.0 release! |
|
Hi, today I found this on Reddit: “https://www.reddit.com/r/StableDiffusion/s/VZHQWZWsc4”. It introduces a lossless compression method that should allow execution on machines with less RAM. I’m not sure if this could be applied to MLX or Apple hardware |
|
I built Measured on an M1 Max:
Distilled 4–8 step Klein schedules don't get algorithmic skipping (adjacent steps differ too much for the gate to fire), so it's targeted at the longer schedules above. Repo and per-variant notes: https://github.com/IonDen/mlx-teacache |
Hello! I've seen your work and it's really piqued my interest—what are you working on right now? :D I have to say, I've been using your tools, especially mlx-taef (in PR). Currently, I'm experimenting with ComfyUI's interface and trying to make omlx, mflux, and mlx-video coexist in order to build complex workflows that I wouldn't know how to handle via CLI. It's funny, and I think something equivalent and versatile is still missing on Apple.
|
|
Hi, thanks @azrahello I also think Apple has great potential on AI landscape and can be a strong competitor to Nvidia, but so many tools are missing now. |
|
@IonDen , what tools do you feel are missing? Personally, when I feel I am missing tools... it often turns out that I can actually do it on a Mac (I use MFlux, DrawThings & ComfyUI)... and the actual issue a block/challenge on the creativity side of my process. Granted a H100 will do stuff faster than my Mac Studio Max. |
|
Is Teacache actually worthwhile? Is Teacache for Flux.2 Klein Base better + faster than Flux.2 Klein Dev? Test images and benchmark times would be greatly appreciated!! |
|
@ianscrivener I have a benchmark and test results. Check it here: https://github.com/IonDen/mlx-teacache/blob/main/COMPARISON.md |
|
Of course you have all major ones on Mac. But still Metal ecosystem is much less mature than CUDA ecosystem. |
thanks @IonDen,
ie is there an compelling reason to use base + teacache... or just keep using Dev as the working model for generations? |






Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, would it be possible to implement an upscaler? Either using ControlNet like this: https://huggingface.co/jasperai/Flux.1-dev-Controlnet-Upscaler or something similar to https://github.com/ssitu/ComfyUI_UltimateSDUpscale? I find the ability to upscale images very useful. I was wondering if there’s a chance to implement it.
P.S. If you need a tester for your projects, I’m always available! 😉
Edit.
Yesterday, I tested this paper and this repository in ComfyUI using FLUX1 dev in 8-bit GGUF. By following this process, I was able to almost halve the number of iterations and the time required, effectively making it faster than MLX. I was wondering if this could be useful and if it could be implemented. It would be amazing to generate images with FLUX in almost half the traditional time!
All reactions