Extremely slow editing of image using Instruct pix2pix in Diffusers #7349
-
Hi guys. Cuda 12.0. Im struggling with using But editing the image takes about 20 seconds. I have seen people get around 3s, how is that even achievable? Here is my code
And here is console log.
Editing image takes 16 seconds here. How can i speed it up? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 10 replies
-
Its taking about 60 seconds with 50 steps. |
Beta Was this translation helpful? Give feedback.
-
You can compile the UNet like this: pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) Except for the first inference, this can help. Also, see the documentation. |
Beta Was this translation helpful? Give feedback.
-
@StandardAI, Thanks for your help. But it doesnot help to speed up. |
Beta Was this translation helpful? Give feedback.
-
Amazing, It looks pretty fast. |
Beta Was this translation helpful? Give feedback.
-
Why mine is so slower than the Colab'sT4? |
Beta Was this translation helpful? Give feedback.
-
@asomoza , Im using 2.2.1 for pytorch |
Beta Was this translation helpful? Give feedback.
-
Maybe, this blog post helps further. |
Beta Was this translation helpful? Give feedback.
-
Also, the compilation time would vary from hardware to hardware as the optimisation code path varies quite a bit. So, this isn't too unexpected IMO. |
Beta Was this translation helpful? Give feedback.
You can compile the UNet like this:
Except for the first inference, this can help. Also, see the documentation.