Nodes/ComfyUI_ZImageI2L_v2/Z-Image i2L v2 — Load Images From Folder
ComfyUI Node

Z-Image i2L v2 — Load Images From Folder

A folder of style references in one node — no wall of Load Image nodes

By jzhang-POP·Created 3 months ago·Updated 3 months ago· 6
Z-Image i2L v2 — Load Images From Folder
    • images
    • count
    folder_path
    limit0

    Boring, useful, tiny. Load Images From Folder does exactly what it says: point it at a directory, get every image in it back as a single batched IMAGE tensor, plus a count. It exists because feeding an i2L workflow style references means feeding several images, and nobody wants to wire up a half-dozen Load Image nodes to do that.

    The inputs: folder_path (the folder) and limit (0 = load everything). The i2L encoder works well with roughly 1–8 references, so a limit is often the right call - a style folder with forty images in it will extract a muddier LoRA than a picked handful. Outputs: images (the batch, ready for Extract LoRA or Generate) and count (an INT you can mostly ignore, but handy if you want to log how many refs actually loaded).

    How it behaves, from the source: files load in sorted filename order, get EXIF-rotated and converted to RGB, and - the thing worth knowing - images with different dimensions get resized to match the first image. That's not a bug; ComfyUI represents a batch as one uniformly-sized tensor, and since the i2L encoders resize internally anyway, style capture is unaffected. Path handling is forgiving: absolute paths, ~ paths, and paths relative to ComfyUI's input folder all work.

    Where it fits: Load Images From Folder → Extract LoRA is the multi-reference workflow, and the pack's own example graphs (zimage_i2l_v2_generate_from_folder.json, the atomic one) use it exactly that way. Generate can take the same batched IMAGE directly if you'd rather skip the explicit extract step.

    Troubleshooting: if the folder isn't found you get an error listing every path it tried - that's your hint to use an absolute path or one relative to ComfyUI/input. "No images found in folder" means an extension mismatch; it accepts .jpg, .jpeg, .png, .webp, .bmp, .gif, .tiff. It does not recurse into subfolders, so flatten the directory or point it at each one.

    Install

    Installs as part of the pack: ComfyUI Manager (search ComfyUI_ZImageI2L_v2) or git clone https://github.com/jzhang-POP/ComfyUI_ZImageI2L_v2 into ComfyUI/custom_nodes/. The one dependency that bites is DiffSynth-Studio, which must come from git because v2 needs its Diffusion Templates API (diffsynth.diffusion.template.TemplatePipeline):

    git clone https://github.com/modelscope/DiffSynth-Studio.git
    cd DiffSynth-Studio && pip install -e . && cd ..
    pip install -r ComfyUI/custom_nodes/ComfyUI_ZImageI2L_v2/requirements.txt
    

    Restart ComfyUI. This node itself doesn't need models - the Loader does that heavy first download - so you can actually use it before anything else is warmed up.

    CategoryZImage-i2L

    Inputs (2)

    NameTypeDefaultDescription
    folder_pathSTRING
    limitoptINT00–1000

    Outputs (2)

    NameTypeDescription
    imagesIMAGE
    countINT