divamgupta / stable-diffusion-tensorflow

Stable Diffusion in TensorFlow / Keras
Other
1.57k stars 227 forks source link

Apple M1 8GB Speed comparison using Python vs using DiffusionBee #52

Closed enzyme69 closed 1 year ago

enzyme69 commented 1 year ago

I am not sure if I have installed the Python version correctly, but using DiffusionBee, I believe I am getting 3-4 minutes per image at default.

While with the python version running it's 10 minutes per image.

I was wondering if the tensorflow gpu is properly installed on my M1 iMac 8GB memory? How do I check?

ju-popov commented 1 year ago

With this library:

Macbook Pro RAM: 32 GB CPU: M1 Pro (8 cores) GPU: (14 cores) Neural Engine: (16 cores)

1.06s per iteration for 512x512 pixels

so... 20 steps per image - 21.2 s 50 steps - 53s

enzyme69 commented 1 year ago

Yes, that's the fastest speed, like the one at PlaygroundAI. The RAM matters I guess and whether it's using Pytorch or Tensorflow, I am not 100% sure.

But DiffusionBee is fast, and then I compare it with Blender's Dream Textures addon, it's around 4 minutes per image, but it varies also depending on the prompt.

I guess the only way it could be faster if we can have 256 x 256 or lower preview thumbnails, the upres somewhat overnight.

I will have to check again tomorrow on why the speed using this repo is slower than DiffusionBee. Maybe there is a way to 100% use CPU? Faster than having some using GPU and some using CPU?

ju-popov commented 1 year ago

Still, it don't seems like 10 minutes to me

enzyme69 commented 1 year ago

Ok I might come back to this. Maybe I need to restart the system when running this.