mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-24 18:28:10 +00:00
Update diffsynth/extensions/FastBlend/patch_match.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -261,8 +261,8 @@ class PyramidPatchMatcher:
|
|||||||
def update_nnf(self, nnf, level):
|
def update_nnf(self, nnf, level):
|
||||||
# upscale
|
# upscale
|
||||||
nnf = nnf.repeat(2, axis=1).repeat(2, axis=2) * 2
|
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[:, 1::2, :, 0] += 1
|
||||||
nnf[: , : , [i for i in range(nnf.shape[0]) if i & 1], 1] += 1
|
nnf[:, :, 1::2, 1] += 1
|
||||||
# check if scale is 2
|
# check if scale is 2
|
||||||
height, width = self.pyramid_heights[level], self.pyramid_widths[level]
|
height, width = self.pyramid_heights[level], self.pyramid_widths[level]
|
||||||
if height != nnf.shape[0] * 2 or width != nnf.shape[1] * 2:
|
if height != nnf.shape[0] * 2 or width != nnf.shape[1] * 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user