stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Support for TPU

Open Ljzd-PRO opened this issue 1 year ago • 16 comments

Can it support Google TPU(like Google Colab)

Ljzd-PRO avatar Oct 18 '22 04:10 Ljzd-PRO

What do you mean? TPUs favor tensorflow, everything here is pytorch.

ClashSAN avatar Oct 18 '22 04:10 ClashSAN

I'm curious as well. If you get a tpu on Collab, then it's going to be slower than a rtx card of the same level?

giteeeeee avatar Oct 18 '22 09:10 giteeeeee

I'm curious as well. If you get a tpu on Collab, then it's going to be slower than a rtx card of the same level?

It’s said that TPU is faster when doing inferences, but not training.

Ljzd-PRO avatar Oct 18 '22 11:10 Ljzd-PRO

Just tested on a local RTX2060 6G vs. on a collab T4 12G

The 2060 appears to be ~25% faster when doing text2image and image2image.

Training I can't test with a 2060 lol

giteeeeee avatar Oct 19 '22 09:10 giteeeeee

TPU seems to be good at generating images in parralel. It would be very nice to have such compatibility.

Extraltodeus avatar Oct 21 '22 15:10 Extraltodeus

Is there any development on this?

iamianM avatar Nov 06 '22 19:11 iamianM

Diffusers officially supports TPU, so I'm guessing it's not a complete rehaul to add it. However, since it's FLAX, I'm not sure exactly how it would be done.

swcrazyfan avatar Nov 08 '22 02:11 swcrazyfan