Skip to content

Conversation

@drhead
Copy link
Contributor

@drhead drhead commented May 24, 2024

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
Copy link
Owner

v0xie commented Jun 8, 2024

This is great, thank you.

@v0xie v0xie changed the base branch from master to dev June 8, 2024 04:57
@v0xie v0xie changed the title fix a shape mismatch with controlnet Fix a shape mismatch with ControlNet for PAG Jun 8, 2024
@v0xie v0xie merged commit d83f075 into v0xie:dev Jun 8, 2024
@v0xie v0xie mentioned this pull request Jun 8, 2024
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants