v0xie / sd-webui-incantations

Enhance Stable Diffusion image quality, prompt following, and more through multiple implementations of novel algorithms for Automatic1111 WebUI.
GNU General Public License v3.0
120 stars 7 forks source link

Question on generation speed #18

Open tusharbhutt opened 3 months ago

tusharbhutt commented 3 months ago

Hi,

not a bug, but a question: is the generation speed supposed to be halved when using this? I went from 2:15 for four 1024x1024 SDXL images at 40 steps (in one batch) to 4:29. Is this normal?

v0xie commented 3 months ago

That's normal for the current implementation.

Normal SDXL batched forward pass computes cond and uncond in one call to the inner model. PAG requires a third cond to be computed, so we're doing so in a second call to the inner model.

Ideally we would batch cond, uncond, and PAG cond together so we get it all done in one call to the inner model.

tusharbhutt commented 3 months ago

Oh cool, hopefully you can find a means of addressing it :)

tusharbhutt commented 1 month ago

I'm an idiot, I shouldn't have closed this. The speed issue remains in that latest version.