Resize control if there is a tensor size mismatch#3917
Resize control if there is a tensor size mismatch#3917asagi4 wants to merge 1 commit intoComfy-Org:masterfrom
Conversation
Fixes PatchModelAddDownscale when used with controlnets, and possibly some other nodes doing similar things as well. Fixes Comfy-Org#3022
|
Does this actually work and would it be better to use nearest instead of bicubic? |
|
I've used this locally for quite a while (never just got around to sending a PR) and it does at least let the controlnet do something, which is an improvement over things not working at all (Instead you just get a bunch of "warning control could not be applied torch.Size([2, 1280, 20, 16]) torch.Size([2, 1280, 40, 32])" ). You can also look at the linked issue where a couple people have reported using it. I haven't tested different algorithms. |
|
"it does something", or "it does what it's supposed to do"? Is this an attempt at hacking SD1 and SDXL controlnets to cross over, or...? |
|
Iit allows the controlnet to work instead of failing and doing nothing when PatchModelAddDownscale does its downscaling, by scaling the control tensor to match; this has nothing to do with mixing models. |
|
ooh the |
Fixes PatchModelAddDownscale when used with controlnets, and possibly some other nodes doing similar things as well.
Fixes #3022
I'm not sure if there's a situation where the operation can fail after this, so I didn't remove the try/except