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
139 stars 9 forks source link

Fix a shape mismatch with ControlNet for PAG #47

Closed drhead closed 5 months ago

drhead commented 6 months ago

This fixes a shape mismatch with controlnet that at least exists with the reference_only processor. Possibly others too, but I haven't tested and this shouldn't wrongly affect anything except similar shape mismatches.

Basically using controlnet reference_only concats the last_to_v we get along the sequence length dimension. This therefore takes only the first seq_len slices along that axis, resolving the issue.

There are still issues with controlnet, it does not work with batch sizes above 1 and I am still investigating (maybe this is a mercy, it's already slow enough combining this with controlnet at batch 1...). But it can at least be used.

v0xie commented 5 months ago

This is great, thank you.