ComfyUI_Ib_CustomNodes

ComfyUI_Ib_CustomNodes
★ 52

图像加载文件路径ComfyUI节点稳定兼容
提供 LoadImageFromPath 节点,直接从文件路径加载图像,避免路径解析与兼容性问题,提升加载稳定性与可靠性。
💡 在流程中从本地路径直接加载图像,避免路径解析错误。
🍴 10 Forks💻 JavaScript🔄 2025-12-05
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/c73fe210bae7
usage
📄 README

ComfyUI_Ib_CustomNodes

Installation

Install via the Custom Nodes Manager in ComfyUI-Manager.

Load Image From Path

def LoadImageFromPath(
    image: str = r'ComfyUI_00001_-assets\ComfyUI_00001_.png [output]'
) -> tuple[Image, Mask]

ComfyUI’s built-in Load Image node can only load uploaded images, which produces duplicated files in the input directory and cannot reload the image when the source file is changed. Load Image From Path instead loads the image from the source path and does not have such problems.

One use of this node is to work with Photoshop’s Quick Export to quickly perform img2img/inpaint on the edited image. Update: For working with Photoshop, comfyui-photoshop is more convenient and supports waiting for changes. See tutorial at r/comfyui.

The image path can be in the following format:

  • Absolute path:
  • D:\ComfyUI\output\ComfyUI_00001_-assets\ComfyUI_00001_.png

  • Relative to the input directory:
  • ComfyUI_00001_-assets\ComfyUI_00001_.png [input]

  • Relative to the output directory:
  • ComfyUI_00001_-assets\ComfyUI_00001_.png [output]

  • Relative to the temp directory:
  • ComfyUI_00001_-assets\ComfyUI_00001_.png [temp]

    Usage Example

    Load Image From Path (Enhanced)

    Enhanced with image preview, file browser and a path output, made by @alFrame:

    File browser:

    Mask:

    PIL.Image

    def PILToImage(
        images: PilImage
    ) -> Image
    def PILToMask(
        images: PilImage
    ) -> Image
    def ImageToPIL(
        images: Image
    ) -> PilImage

    Mainly for use with ComfyScript‘s real mode.