Nodes/ComfyUI-ZML-Image/ZML_标签化图像加载器
ComfyUI Node

ZML_标签化图像加载器

Batch-load images with thumbnails and pull their prompts out at the same time

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_标签化图像加载器
    • 图像列表
    • 文本块
    • 文本块验证
    • 文件夹路径
    selected_files_json[]
    文本块输出true
    text_blocks_input

    ZML_TagImageLoader is the pack's big batch image picker: a UI-heavy loader (the author openly borrowed the interface idea from the WeiLin prompt suite) where your folder's images show up as clickable thumbnails, you select the ones you want, and they come out the other side as an image list - along with any embedded prompt text blocks and the folder path. It's the loader you use when you want to pick a handful of reference images visually instead of typing a filename.

    The name is "tag image loader" because of the pack's core idea: images saved by ZML_SaveImage carry a hidden text block (the comfy_text_block chunk) containing the prompt. This loader reads those back, so loading an image and recovering its prompt happen in one node.

    The inputs

    • selected_files_json - an internal JSON string holding the currently selected files. It's what the UI writes as you click thumbnails; you generally don't touch it by hand, but it does mean the selection state is stored in the workflow.
    • 文本块输出 (boolean, default on) - the toggle for which text comes out of the 文本块 output. Per the code: when on, it outputs what's in the text box; when off, it reads the text blocks extracted from the loaded images instead. Flip it to switch between "my own typed text" and "the prompts baked into these PNGs."
    • text_blocks_input - a multiline text box holding your own text, used when 文本块输出 is on.

    The outputs

    • 图像列表 - the loaded images as a list (IMAGE, is_list), which means they can be different resolutions - the loader doesn't force-resize.
    • 文本块 - the joined text block(s) from the images (or your typed text, per the toggle).
    • 文本块验证 - a status string telling you whether text blocks were actually found, so you can tell a "no prompt in this file" from a real failure.
    • 文件夹路径 - the folder the images came from, handy to hand to other nodes that need a path.

    It's a "pick from thumbnails" workflow in the modern custom-node style - the list output with mixed resolutions is the detail that makes it genuinely useful for reference-image work, since you're not stuck with a single forced canvas size.

    Where it fits

    Paired with ZML_SaveImage, it closes the loop the whole pack is built on: save images with their prompts embedded, later batch-load a few and get both pixels and prompts. It's also just a nicer way to select reference images than a text path box when you work with folders of PNGs. The one thing to remember: text blocks only live in PNGs - a JPEG or a re-encoded upload will come back with "no text block found," which the 文本块验证 output will tell you honestly.

    Install

    ComfyUI Manager → search "ComfyUI-ZML-Image", or cd ComfyUI/custom_nodes && git clone https://github.com/zml-w/ComfyUI-ZML-Image, restart. Displayed as ZML_标签化图像加载器 in the Chinese-default UI; the English patch translates it. No models or extra downloads for this node.

    Categoryimage/ZML_图像/工具

    Inputs (3)

    NameTypeDefaultDescription
    selected_files_jsonSTRING[]
    文本块输出BOOLEANtrue
    text_blocks_inputSTRING

    Outputs (4)

    NameTypeDescription
    图像列表IMAGE
    文本块STRING
    文本块验证STRING
    文件夹路径STRING