Fix VAEEncodeForInpaint modifying source image.

This commit is contained in:
comfyanonymous 2023-03-16 17:10:08 -04:00
parent f11d5e0748
commit bf1dc1d9bc
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ class VAEEncodeForInpaint:
y = (pixels.shape[2] // 64) * 64
mask = torch.nn.functional.interpolate(mask[None,None,], size=(pixels.shape[1], pixels.shape[2]), mode="bilinear")[0][0]
pixels = pixels.clone()
if pixels.shape[1] != x or pixels.shape[2] != y:
pixels = pixels[:,:x,:y,:]
mask = mask[:x,:y]