Ideas for speeding up with M1Mac #4314
Replies: 4 comments
-
Can you please share your stats? How long does it take to generate a single 512x512 image at 20, 50 steps? Can you generate 2048x2048 images with that amount of RAM? |
Beta Was this translation helpful? Give feedback.
-
txt2img(average on Batch count=10) img2img(average on Batch count=10) python: 10-16GB dedicated, GPU: 92-95% 2048x2048 image Impossible. Even 1024*1024 crashes with the error message below.
Increasing the batch size is a good idea. Thank you. Also, increasing the batch size is a way to output multiple images from one input image. By starting multiple webui.py, it was possible to process in parallel. However, this method slows down each webui.py and is (slightly) less efficient than a single run of webui.py. It has become a long sentence without stopping... |
Beta Was this translation helpful? Give feedback.
-
Can you please provide instructions on this? Change pytorch from stable to Preview (Nightly). : Fairly fast. |
Beta Was this translation helpful? Give feedback.
-
I just tried both --opt-split-attention and using torch nightly but I am still getting 2.05 it/s for a euler a 512x512 (unchanged vs before) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running stable-diffusion-webui on M1Mac (MacStudio 20coresCPU,48coresGPU, Apple M1 Ultra, 128GB RAM 1TB SSD).
It runs faster than the webui on my previous M1 Macmini (16GB RAM, 512 GB SSD), and I'm happy with it (although it was a little more expensive :D).
However, I would like to configure MacStudio to use its abundant resources more effectively and speed up processing even further.

It is a resource (load) image of the PC when continuously "Batch img2img" processes 384*640 size images (according to the application "iStat"), but the GPU is only using 55% and the CPU is only 11%. Even with 128GB of memory, python consumes about 10-16GB.
Is it possible to use these extra resources to do things faster?
Since I don't have much knowledge of computer architecture, I was searching for settings to speed things up at random. for example…
webui.py options
--opt-split-attention: slightly faster
--opt-channelslast: pretty slow
--disable-safe-unpickle: A bit faster (maybe?). But there are risks.
—use-cpu all: too slow.
Python library
Change pytorch from stable to Preview (Nightly). : Fairly fast.
xformers : Currently, it seems that you can't install it on Mac.
others
Placing stable-diffusion-webui on the ramdisk: Loading large file sizes is faster, but image processing itself remains the same.
It's really hit and miss. The best bet would be "best machine with best GPU", any other Mac ideas for speeding things up?
Translated by Google.
Thank you for reading my poor English.
Beta Was this translation helpful? Give feedback.
All reactions