Nodes/comfyUI-tool-2lab/load image 读入图片
ComfyUI Node

load image 读入图片

Core LoadImage, wearing a workflow2api name tag

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
load image 读入图片
    • IMAGE
    • MASK
    image
    desc图片
    exporttrue

    InputImage (2lab) is, mechanically, ComfyUI's standard image loader with a name change and two extra metadata fields. The display name even says so - "load image 读入图片" - and the default description on the desc field is the Chinese word for image (图片), which tells you exactly who wrote it. Same job as core LoadImage: pick a file from ComfyUI's input folder, get an IMAGE tensor (and a MASK) out the other side.

    So why not just use LoadImage? Because this one lives in the workflow2Api family. Alongside the file picker it carries a desc label and an export boolean - the metadata the pack's API-export flow reads to decide which inputs the person calling the endpoint gets to replace. If you're building a workflow where a caller supplies the image (img2img as a service, an upscale endpoint, a face-fix API), this is the node that says "this is the input slot." If you're not building an API, it's still a perfectly good image loader with a nicer label.

    How it works

    Required inputs:

    • image - a dropdown of image files, pulled from ComfyUI's input directory (the default entry is example.png). Same behavior as core LoadImage: drop your files into ComfyUI/input, hit refresh, pick one.
    • desc - a description, defaulting to 图片 ("image"). A label for whoever reads the workflow or calls the API.
    • export - boolean, default true. The API-surface switch.

    Outputs are the standard pair:

    • IMAGE - the image tensor, wire it to a VAE Encode for img2img, an upscaler, or anything downstream that eats images.
    • MASK - the alpha channel as a mask, when the source has transparency and you need a mask output.

    The whole workflow2api export layer is undocumented in the pack - the README is one word long - so locally these extra fields are labels and toggles that don't change the node's behavior. Use them as documentation for your future self and for anyone you share the graph with.

    Installing it

    It's in the AI2lab/comfyUI-tool-2lab pack. ComfyUI Manager → search comfyUI-tool-2lab → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AI2lab/comfyUI-tool-2lab
    

    Then restart ComfyUI. Nothing heavy to download - pure-python, no model files. If you only ever load images from your own input folder, LoadImage does the job and you can skip this one. If you're building a shareable or API-backed workflow and want the image input to be explicit and labeled, this is the version to reach for.

    Category🦊2lab/workflow2Api

    Inputs (3)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png
    descSTRING图片
    exportBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK