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? |
Replies: 8 comments 10 replies
|
Its taking about 60 seconds with 50 steps. |
|
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. |
|
@StandardAI, Thanks for your help. But it doesnot help to speed up. |
|
Amazing, It looks pretty fast. |
|
Why mine is so slower than the Colab'sT4? |
|
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. |
You can compile the UNet like this:
Except for the first inference, this can help. Also, see the documentation.