Nodes/ComfyUI-load-image-prompt-lora/YAML Image Cycler (Simple)
ComfyUI Node

YAML Image Cycler (Simple)

When the prompt is someone else's job

By avocadori·Created about a year ago·Updated about a year ago· 0
YAML Image Cycler (Simple)
    • image
    • mask
    • category
    • yaml_path
    yaml_pathsetting.yaml
    parent_dir./data
    category

    YAML Image Cycler (Simple) is the same cycling machine as the pack's Full node, minus the prompt and LoRA extraction. Same folder walking, same per-category cursor, same mask lookup - but instead of returning prompt and lora1-3, it hands back category and yaml_path. That sounds like a downgrade until you hit the workflow where the prompt comes from somewhere else, or where you'd rather split the job across nodes so each one does one thing.

    That split is literally the pattern the author recommends in the README: Simple feeds images and masks into the graph, YAMLLoRAExtractor handles the prompt and LoRA data, and YAMLLoRASelector talks to a Wan pipeline. Modular, and each node stays small enough to debug. If you're doing image-to-video batch runs where the reference frames change but the prompt text lives in a text node you're already editing anyway, Simple is the one you actually want.

    How it works

    Identical machinery to the Full node: it reads the YAML (mainly to find the category's mask_folder and confirm the category exists), lists images from <parent_dir>/<category>/ sorted alphabetically, and advances one per run. Masks resolve from the YAML mask folder, an <image_dir>/masks subfolder, or the image's own folder - else a blank mask.

    It has two small personality quirks the Full node lacks. First, it strips surrounding quotes off yaml_path and resolves it to an absolute path, so if you paste a path in with stray quotes it still works - and it prints verbose debug lines to the console showing the original, normalized and absolute paths. Second, it returns the resolved yaml_path as an output. That's a quiet feature, but a useful one: wire it into the extractor or selector downstream and the whole chain is guaranteed to be reading the same file you told the cycler about.

    The inputs and outputs

    Same three required inputs as the Full node - yaml_path (default setting.yaml), parent_dir (default ./data) and category (dropdown of your YAML keys, or free text). Four outputs:

    • image (IMAGE) - the cycled frame, sorted alphabetically per category.
    • mask (MASK) - matching mask, or an all-black one if none exists.
    • category (STRING) - the category name you selected, handy for routing or labeling.
    • yaml_path (STRING) - the resolved YAML path, feed it onward.

    Installing

    No dependencies to worry about - the pack has no requirements.txt, just clone and restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/avocadori/ComfyUI-load-image-prompt-lora
    

    Or in ComfyUI Manager, search ComfyUI-load-image-prompt-lora and install from there.

    Common issues

    • "YAML file not found" - this node's version of that error is the most talkative in the pack: it prints the path as given, the normalized path, the absolute path and the current working directory. If you see it, your yaml_path doesn't resolve against wherever you launched ComfyUI from. Move the file or use an absolute path.
    • No images in the folder - check the extension (png/jpg/jpeg/bmp/webp/tiff/tga are supported) and that the folder isn't empty.
    • It loops from the start after reloading a workflow - the cursor is in-memory state on the node, so that's expected behavior, not a fault.
    CategoryLoaders

    Inputs (3)

    NameTypeDefaultDescription
    yaml_pathSTRINGsetting.yaml
    parent_dirSTRING./data
    categorySTRING

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    categorySTRING
    yaml_pathSTRING