From b4f35d13abd03fbd092405cdbe22108eda497615 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:30:53 +0200 Subject: [PATCH] Update nodes.py --- nodes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodes.py b/nodes.py index b8abf56..d240600 100644 --- a/nodes.py +++ b/nodes.py @@ -12,7 +12,9 @@ from .sgm.util import instantiate_from_config script_directory = os.path.dirname(os.path.abspath(__file__)) class SUPIR_Upscale: - upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + def __init__(self): + self.current_sdxl_model = None + self.upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] @classmethod def INPUT_TYPES(s): return {"required": { @@ -65,8 +67,7 @@ class SUPIR_Upscale: device = comfy.model_management.get_torch_device() image = image.to(device) - self.current_sdxl_model = None - + SUPIR_MODEL_PATH = folder_paths.get_full_path("checkpoints", supir_model) SDXL_MODEL_PATH = folder_paths.get_full_path("checkpoints", sdxl_model)