From 977eda19a6471fbff253dc92c3c2f1a4a67b1793 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Thu, 11 Jan 2024 03:29:58 -0500 Subject: [PATCH] Don't round noise mask. --- comfy/sample.py | 1 - 1 file changed, 1 deletion(-) diff --git a/comfy/sample.py b/comfy/sample.py index 4b0d15c4..5c8a7d13 100644 --- a/comfy/sample.py +++ b/comfy/sample.py @@ -28,7 +28,6 @@ def prepare_noise(latent_image, seed, noise_inds=None): def prepare_mask(noise_mask, shape, device): """ensures noise mask is of proper dimensions""" noise_mask = torch.nn.functional.interpolate(noise_mask.reshape((-1, 1, noise_mask.shape[-2], noise_mask.shape[-1])), size=(shape[2], shape[3]), mode="bilinear") - noise_mask = noise_mask.round() noise_mask = torch.cat([noise_mask] * shape[1], dim=1) noise_mask = comfy.utils.repeat_to_batch_size(noise_mask, shape[0]) noise_mask = noise_mask.to(device)