From 19d25f5f61370ac2d68841e16f3e2cfe0925793c Mon Sep 17 00:00:00 2001 From: InpaintRegionEditor Dev Date: Tue, 3 Mar 2026 18:44:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E6=8C=81=20MaskEditor=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=90=8E=E7=9A=84=20clipspace=20=E5=AD=90?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 folder_paths.get_filename_list('input') 替代手动遍历 - 递归搜索包含子目录文件(如 clipspace/) - 添加 image_upload 参数支持上传功能 - 删除前端不必要的 clipspace 处理代码 --- nodes.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nodes.py b/nodes.py index b05bb1c..ed6cf0c 100644 --- a/nodes.py +++ b/nodes.py @@ -25,17 +25,11 @@ class InpaintRegionEditor: @classmethod def INPUT_TYPES(s): - input_dir = folder_paths.get_input_directory() - files = [ - f - for f in os.listdir(input_dir) - if os.path.isfile(os.path.join(input_dir, f)) - ] - files = folder_paths.filter_files_content_types(files, ["image"]) + files = folder_paths.get_filename_list("input") return { "required": { - "image": (sorted(files), {}), + "image": (sorted(files), {"image_upload": True}), "padding": ("INT", {"default": 64, "min": 0, "max": 512, "step": 32}), }, "hidden": {