Results are horrible using MPS

#48
by jchiu - opened

As title suggests. The image output results are really bad when I use MPS hardware accelerator. Is there a reason as to why this is the case?

What do you mean by bad ?

These were all generated using MPS (M3 iMac) using the diffusers fork.

decode_cascade_2024_03_01_1.png
decode_cascade_2024_03_01_0.png
decode_cascade_4.png
decode_cascade_3.png

They end up looking really grainy. Is the model here the big-big one? I think I may have been using the small-small one which resulted in poor outputs.

An additional issue I noticed is that if I also try to pass get a smaller resolution they become crops. Is this just a result of the really small latent spaces so anything below 1024x1024 won't give good outputs?

Yep, big model but using bfloat16 which needs a fairly recent pytorch nightly.

bfloat16 is not supported on MPS though right? Unless this is what you mean by needs a fairly recent pytorch nightly?

Yep, the recent (3 or 4 weeks or so) nightly pytorchs support enough bfloat16 to do SD and Cascade. Doesn't look like the changes will be in PyTorch 2.2.x so I'm hoping they'll be in the 2.3 releases.

Sign up or log in to comment