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 +}