From fe7ca919ab2f68e0812cce8b7dd09680be72836c Mon Sep 17 00:00:00 2001 From: ssitu Date: Wed, 8 Oct 2025 12:39:28 -0400 Subject: [PATCH] Support v3 schema update of upscale models (#167) --- modules/upscaler.py | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/upscaler.py b/modules/upscaler.py index 277c012..cf8697a 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -14,7 +14,11 @@ class Upscaler: return img if (shared.actual_upscaler is None): return img.resize((img.width * scale, img.height * scale), Image.Resampling.LANCZOS) - (upscaled,) = ImageUpscaleWithModel().upscale(shared.actual_upscaler, shared.batch_as_tensor) + if "execute" in dir(ImageUpscaleWithModel): + # V3 schema: https://github.com/comfyanonymous/ComfyUI/pull/10149 + (upscaled,) = ImageUpscaleWithModel.execute(shared.actual_upscaler, shared.batch_as_tensor) + else: + (upscaled,) = ImageUpscaleWithModel().upscale(shared.actual_upscaler, shared.batch_as_tensor) shared.batch = [tensor_to_pil(upscaled, i) for i in range(len(upscaled))] return shared.batch[0] diff --git a/pyproject.toml b/pyproject.toml index b0c02e1..7235c61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_ultimatesdupscale" description = "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A." -version = "1.4.0" +version = "1.5.0" license = { file = "LICENSE" } [project.urls]