From a84b77d396ddebcab3c28aa2d711b3b3af72286b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 30 Apr 2025 09:44:34 -0400 Subject: [PATCH] fix texture tiling Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 2 ++ modules/processing_helpers.py | 8 +++----- wiki | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a61884d4..48bbe24d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,13 @@ - CUDA: set default to `torch==2.7.0` with `cuda==12.8` - FramePack: improve performance - Docker: pre-install `ffmpeg` + - Wiki: updated pages: *Video, ZLUDA* - **Fixes** - FramePack: correct dtype - NNCF: check dependencies and register quant type - API: refresh checkpoint list - Styles: save style with prompt + - Texture tiling: fix apply when switching models ## Highlights for 2025-04-28 diff --git a/modules/processing_helpers.py b/modules/processing_helpers.py index 25418563d..dc339f8af 100644 --- a/modules/processing_helpers.py +++ b/modules/processing_helpers.py @@ -538,19 +538,17 @@ def set_latents(p): return latents -last_circular = False -def apply_circular(enable, model): - global last_circular # pylint: disable=global-statement +def apply_circular(enable: bool, model): if not hasattr(model, 'unet') or not hasattr(model, 'vae'): return - if last_circular == enable: + if getattr(model, 'texture_tiling', False) == enable: return try: for layer in [layer for layer in model.unet.modules() if type(layer) is torch.nn.Conv2d]: layer.padding_mode = 'circular' if enable else 'zeros' for layer in [layer for layer in model.vae.modules() if type(layer) is torch.nn.Conv2d]: layer.padding_mode = 'circular' if enable else 'zeros' - last_circular = enable + model.texture_tiling = enable except Exception as e: debug(f"Diffusers tiling failed: {e}") diff --git a/wiki b/wiki index 520ecec45..2c058a661 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 520ecec454737a9838d9f090804327b8f3426f99 +Subproject commit 2c058a661468adc0dd42a7c31cfc8044d081344e