Backward compatibility patch for changes in the method signature of InpaintModelConditioning. (#5825)

https://github.com/comfyanonymous/ComfyUI/issues/5813
This commit is contained in:
Dr.Lt.Data 2024-11-29 10:30:28 +09:00 committed by GitHub
parent 26fb2c68e8
commit 82c5308561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -392,7 +392,7 @@ class InpaintModelConditioning:
CATEGORY = "conditioning/inpaint"
def encode(self, positive, negative, pixels, vae, mask, noise_mask):
def encode(self, positive, negative, pixels, vae, mask, noise_mask=True):
x = (pixels.shape[1] // 8) * 8
y = (pixels.shape[2] // 8) * 8
mask = torch.nn.functional.interpolate(mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])), size=(pixels.shape[1], pixels.shape[2]), mode="bilinear")