From 876521c9cc44672bb723c8075eb410ae842999bd Mon Sep 17 00:00:00 2001 From: yp Date: Wed, 11 Jun 2025 19:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=9B=BE=E7=89=87=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodes/image.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nodes/image.py b/nodes/image.py index a681366..a7be199 100644 --- a/nodes/image.py +++ b/nodes/image.py @@ -4,6 +4,7 @@ from PIL import Image import numpy as np import torch + class SaveImagePath: @classmethod def INPUT_TYPES(s): @@ -49,7 +50,9 @@ class SaveImagePath: pil_image = Image.fromarray(image_path) - output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "output") + # output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "output") + # base_dir = os.path.dirname(os.path.abspath(__file__)) + output_dir = 'root/comfy/ComfyUI/output' if not os.path.exists(output_dir): os.makedirs(output_dir) @@ -59,10 +62,11 @@ class SaveImagePath: return (p,) + # 节点类定义结束,以下是用于注册节点的字典结构(通常在实际使用中由ComfyUI等框架来解析和注册) NODE_CLASS_MAPPINGS = { "SaveImagePath": SaveImagePath } NODE_DISPLAY_NAME_MAPPINGS = { "SaveImagePath": "保存图片路径" -} \ No newline at end of file +}