From 03d91f6618376c6fa9d5bc3e710bcf6ce94806a5 Mon Sep 17 00:00:00 2001 From: Artiprocher Date: Fri, 23 Aug 2024 09:28:10 +0800 Subject: [PATCH] fix bug --- diffsynth/pipelines/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffsynth/pipelines/base.py b/diffsynth/pipelines/base.py index b4e3089..78e66b5 100644 --- a/diffsynth/pipelines/base.py +++ b/diffsynth/pipelines/base.py @@ -37,7 +37,7 @@ class BasePipeline(torch.nn.Module): height, width = value.shape[-2:] weight = torch.ones_like(value) for latent, mask, scale in zip(latents, masks, scales): - mask = self.preprocess_image(mask.resize((height, width))).mean(dim=1, keepdim=True) > 0 + mask = self.preprocess_image(mask.resize((width, height))).mean(dim=1, keepdim=True) > 0 mask = mask.repeat(1, latent.shape[1], 1, 1) value[mask] += latent[mask] * scale weight[mask] += scale