diff --git a/README.md b/README.md index 0f724c8..f808e78 100644 --- a/README.md +++ b/README.md @@ -415,6 +415,7 @@ In the custom_nodes folder, `git clone` **2024.10.24** - Added D2 Regex Replace +- D2 Load Image: Added image path input **2024.10.19** - Added D2 Queue Button diff --git a/README_ja.md b/README_ja.md index 40e38cf..a501f28 100644 --- a/README_ja.md +++ b/README_ja.md @@ -414,6 +414,7 @@ custom_nodes フォルダで `git clone` する **2024.10.24** - D2 Regex Replace を追加 +- D2 Load Image: 画像パスの入力を追加 **2024.10.19** diff --git a/README_zh.md b/README_zh.md index 9f2f19d..b8deaca 100644 --- a/README_zh.md +++ b/README_zh.md @@ -413,6 +413,7 @@ ComfyUI Manager → Custom Node Manager → 搜索 `D2 Nodes` 並安裝 **2024.10.24** - 新增 D2 Regex Replace +- D2 Load Image: 增加圖片路徑輸入 **2024.10.19** - 新增 D2 Queue Button diff --git a/d2_nodes.py b/d2_nodes.py index 54e6633..2416fa6 100644 --- a/d2_nodes.py +++ b/d2_nodes.py @@ -39,6 +39,7 @@ class D2_LoadImage(LoadImage): "image": (sorted(files), {"image_upload": True}) }, "optional": { + "image_path": ("STRING", {"forceInput": True}), "editor": ("D2MASKEDITOR", {}) } } @@ -48,7 +49,11 @@ class D2_LoadImage(LoadImage): FUNCTION = "load_image" CATEGORY = "D2" - def load_image(self, image): + def load_image(self, image, image_path=None): + + if image_path != None: + image = image_path + # オリジナルのLoadImage処理 output_images, output_masks = super().load_image(image)