ComfyUI Node

Load Image Node

Load Image, plus path and dimensions as strings — LoadImageNai is the variant with receipts

By KoreTeknology·Created 2 years ago·Updated 2 years ago· 16
Load Image Node
  • image_target
  • IMAGE
  • MASK
  • LAYER
  • Image Path
  • Image Size
methodmkl
strength1.00
image
strength1.00

This node is ComfyUI's built-in Load Image with a twist: it hands you the file path and the image size as plain strings, on top of the image and mask. If you've ever wanted a workflow that knows what file it loaded and can name its own output accordingly, that's the appeal. But read this before you build on it - the experimental category tag is doing real work here.

What it does

It loads an image file from ComfyUI's input directory (same file picker as the built-in Load Image, with upload support) and returns five outputs:

  • IMAGE - the loaded image tensor.
  • MASK - the alpha mask, if the file has one.
  • LAYER - an IMAGE.
  • Image Path - the absolute file path as a STRING.
  • Image Size - the dimensions as a STRING, like "512 x 512".

That path and size as data is the whole reason to choose it over the stock Load Image. You can feed Image Path into a text display node, use it in a filename template, or log it - the stock loader just gives you pixels and silence.

The honest part: the color-matching hooks are dead code

Here's where the experimental flag earns its keep. The inputs include image_target (an IMAGE), method (the same mkl/reinhard/mvgd/histogram-matching list as ColorMatch2 in this pack), and strength. It clearly was meant to also color-match the loaded image to a target. There's even a full colormatch() method in the source that imports color-matcher. But in the shipped code the call is commented out - the method is never invoked. So:

  • method and strength do nothing. At all. Setting them changes nothing.
  • The LAYER output isn't a composited result; it's just image_target passed straight through untouched.
  • strength even appears twice in the schema (once required, once optional) - a schema slip that tells you this node was assembled in a hurry.

It still loads images fine and gives you the path/size strings. Just don't expect grading. If you want the color transfer, that's ColorMatch2's job in this pack.

When to reach for it

Only when you genuinely need the path or dimensions as data further down the graph. For plain loading, the built-in Load Image is simpler, more tested, and doesn't come with a bunch of inert widgets confusing anyone who opens the workflow. This one is for the niche case where you want your workflow to be self-aware about its inputs.

Install

Part of the ComfyUI Production Nodes Pack by Uriel Deveaud (KoreTeknology). Install via ComfyUI Manager (search "ComfyUI Production Nodes Pack") or:

cd ComfyUI/custom_nodes
git clone https://github.com/KoreTeknology/ComfyUI-Nai-Production-Nodes-Pack
cd ComfyUI-Nai-Production-Nodes-Pack
pip install -r requirements.txt

Restart ComfyUI. No model downloads; it needs nothing beyond the pack's standard PIL/torch requirements (the color-matcher dep only matters if you somehow trigger the dead method). Find it under experimental/image, and the class name is LoadImageNai in workflow JSON.

Categoryexperimental/image

Inputs (5)

NameTypeDefaultDescription
image_targetIMAGE
methodCOMBOmkl6 options: mkl, hm, reinhard, mvgd, hm-mvgd-hm, hm-mkl-hm
strengthFLOAT1.000–10
imageCOMBO1 options: example.png
strengthoptFLOAT1.000–10

Outputs (5)

NameTypeDescription
IMAGEIMAGE
MASKMASK
LAYERIMAGE
Image PathSTRING
Image SizeSTRING