From cb9a98edf11658d2df7d4564458c2383dc727094 Mon Sep 17 00:00:00 2001 From: Sebastian Monroy Date: Wed, 1 Oct 2025 14:29:14 +0100 Subject: [PATCH] import ImagePadKJ from kijai library for NilorImageResizeV2 --- nilornodes.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nilornodes.py b/nilornodes.py index fac00df..93d4d63 100644 --- a/nilornodes.py +++ b/nilornodes.py @@ -21,6 +21,19 @@ from .utils import pil2tensor, tensor2pil import logging from comfy.utils import common_upscale from comfy import model_management +import sys +from os.path import dirname, join + +# Attempt to import ImagePadKJ from comfyui-kjnodes if available +_kj_nodes_path = join(dirname(__file__), "..", "comfyui-kjnodes", "nodes") +if _kj_nodes_path not in sys.path: + sys.path.append(_kj_nodes_path) +try: + from image_nodes import ImagePadKJ # type: ignore +except Exception as _e: + logging.warning( + f"⚠️ Nilor-Nodes: Could not import ImagePadKJ from comfyui-kjnodes ( {_kj_nodes_path} ): {_e}" + ) BIGMIN = -(2**53 - 1) BIGMAX = 2**53 - 1