From 7e5ce5d5c90707639ad1a3b71c438a2b1536d972 Mon Sep 17 00:00:00 2001 From: xycdx <93649382+xycdx@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:48:54 +0800 Subject: [PATCH] Update diffsynth/extensions/FastBlend/patch_match.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- diffsynth/extensions/FastBlend/patch_match.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffsynth/extensions/FastBlend/patch_match.py b/diffsynth/extensions/FastBlend/patch_match.py index 08508b5..8ba6003 100644 --- a/diffsynth/extensions/FastBlend/patch_match.py +++ b/diffsynth/extensions/FastBlend/patch_match.py @@ -261,8 +261,8 @@ class PyramidPatchMatcher: def update_nnf(self, nnf, level): # upscale nnf = nnf.repeat(2, axis=1).repeat(2, axis=2) * 2 - nnf[: , [i for i in range(nnf.shape[0]) if i & 1], : , 0] += 1 - nnf[: , : , [i for i in range(nnf.shape[0]) if i & 1], 1] += 1 + nnf[:, 1::2, :, 0] += 1 + nnf[:, :, 1::2, 1] += 1 # check if scale is 2 height, width = self.pyramid_heights[level], self.pyramid_widths[level] if height != nnf.shape[0] * 2 or width != nnf.shape[1] * 2: