From 898615122f224d24cc4c53a30e67c8b0e70579da Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Tue, 19 Nov 2024 15:31:09 -0500 Subject: [PATCH] Rename add_noise_mask -> noise_mask. --- nodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes.py b/nodes.py index 300cfcf1..7f151586 100644 --- a/nodes.py +++ b/nodes.py @@ -382,7 +382,7 @@ def INPUT_TYPES(s): "vae": ("VAE", ), "pixels": ("IMAGE", ), "mask": ("MASK", ), - "add_noise_mask": ("BOOLEAN", {"default": True, "tooltip": "Add a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model."}), + "noise_mask": ("BOOLEAN", {"default": True, "tooltip": "Add a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model."}), }} RETURN_TYPES = ("CONDITIONING","CONDITIONING","LATENT") @@ -391,7 +391,7 @@ def INPUT_TYPES(s): CATEGORY = "conditioning/inpaint" - def encode(self, positive, negative, pixels, vae, mask, add_noise_mask): + def encode(self, positive, negative, pixels, vae, mask, noise_mask): 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") @@ -415,7 +415,7 @@ def encode(self, positive, negative, pixels, vae, mask, add_noise_mask): out_latent = {} out_latent["samples"] = orig_latent - if add_noise_mask: + if noise_mask: out_latent["noise_mask"] = mask out = []