From 20a148fd694688506b1d6730a3c5cb138908cf00 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:12:42 +0000 Subject: [PATCH 1/2] Fix FreeScale resolution check running after processing state is modified The sub-1024 early return happened after init_images was nulled, task_args were injected and the sampler overridden, so the fallback to normal processing ran with a broken img2img setup. Check the resolution before mutating the processing object. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude --- scripts/freescale_ext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/freescale_ext.py b/scripts/freescale_ext.py index 4068620ef..1317a7b01 100644 --- a/scripts/freescale_ext.py +++ b/scripts/freescale_ext.py @@ -90,6 +90,10 @@ class FreeScaleScript(scripts_manager.Script): resolutions_list.append(scale(s4_scale)) restart_steps.append(int(p.steps * s4_restart)) + if p.width < 1024 or p.height < 1024: + log.error(f'FreeScale: width={p.width} height={p.height} minimum=1024') + return None + p.task_args['resolutions_list'] = resolutions_list p.task_args['cosine_scale'] = cosine_scale p.task_args['restart_steps'] = [min(max(1, step), p.steps-1) for step in restart_steps] @@ -101,10 +105,6 @@ class FreeScaleScript(scripts_manager.Script): if override_sampler: p.sampler_name = 'Euler a' - if p.width < 1024 or p.height < 1024: - log.error(f'FreeScale: width={p.width} height={p.height} minimum=1024') - return None - if not self.is_img2img: shared.sd_model = sd_models.switch_pipe(StableDiffusionXLFreeScale, shared.sd_model) else: From 5077db32a77ca15270aadfcc607bd9d207936c83 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:12:20 +0000 Subject: [PATCH 2/2] Fix FreeScale stage resolutions not snapped to multiple of 8 Operator precedence made 8 * w * x // 8 cancel out, so fractional scale factors produced resolutions not divisible by 8 and broke the SDXL latent shape requirements. Apply the same idiom as pixelsmith_ext. https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2 Co-Authored-By: Claude --- scripts/freescale_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/freescale_ext.py b/scripts/freescale_ext.py index 1317a7b01..49a5535f7 100644 --- a/scripts/freescale_ext.py +++ b/scripts/freescale_ext.py @@ -67,7 +67,7 @@ class FreeScaleScript(scripts_manager.Script): def scale(x): if (p.width == 0 or p.height == 0) and p.init_images is not None: p.width, p.height = p.init_images[0].width, p.init_images[0].height - resolution = [int(8 * p.width * x // 8), int(8 * p.height * x // 8)] + resolution = [8 * int(p.width * x // 8), 8 * int(p.height * x // 8)] return resolution scales = []