YAML Image Cycler (Full)
One YAML file runs your whole image–prompt–LoRA loop
- image
- mask
- prompt
- lora1
- lora2
- lora3
If you've ever built a batch workflow where every shot or character needs its own reference image, its own prompt, and its own LoRA stack, you know the pain: a wall of switches, or manual re-seeding between runs. YAML Image Cycler (Full) is the flagship node of the ComfyUI-load-image-prompt-lora pack, and its whole idea is to move that per-category config out of the graph and into one YAML file. Point it at a folder of images and a category name, and it hands back the next image, its matching mask, the prompt, and up to three LoRA names - advanced by one on every run.
It's built for exactly the workflow that keeps people on Wan: character-consistency runs where a per-character LoRA (trained on a couple dozen stills) gets swapped in while you step through reference frames. The pack author's README is in Japanese, but the shape is obvious - the node cycles, you build the batch around it.
How it works
The node reads a YAML file where the top-level keys are category names, and each one carries a prompt, up to three LoRA entries, and an optional mask folder:
character1:
prompt: "1girl, beautiful, anime style, detailed face"
lora1: "<lora:character1_v1:0.8>"
lora2: "<lora:anime_style:0.6>"
lora3: ""
mask_folder: "character1/masks"
Images are pulled from <parent_dir>/<category>/ and sorted alphabetically - png, jpg, jpeg, bmp, webp, tiff and tga all count. A per-category cursor lives on the node instance, so each Queue run steps forward one image, wrapping around at the end. Masks are found by matching the image's filename in the YAML-specified mask folder, then an <image_dir>/masks subfolder, then the image's own folder; if nothing matches you get an empty all-black mask instead of an error. The LoRA entries are unwrapped from <lora:name:weight> down to just the name, with a file-existence check that walks up from the working directory hunting for models/loras. That check only prints warnings - it never blocks a run, and it's the weakest part of the node, more on that below.
The inputs and outputs that matter
Three inputs, all strings:
- yaml_path - defaults to
setting.yaml. Relative to the directory you launch ComfyUI from, not ComfyUI's root. This is the number-one gotcha. - parent_dir - defaults to
./data. Your image root, with one subfolder per category. - category - a dropdown built from your YAML's keys at node creation, or a free-text field if the file wasn't readable then.
Outputs are image (IMAGE), mask (MASK), prompt (STRING) and lora1/lora2/lora3 (STRING). The image goes to a KSampler or an image-to-video encoder; the mask plugs straight into mask-based nodes like Set_LoadMask; the prompt feeds a CLIP text encode.
The trap to know before you wire it: those lora1-3 outputs are bare names - no weight, no extension, no validation you can trust. They're meant for building prompt text, not for a LoraLoader's lora_name input. If you want clean, validated names for a loader, that's the pack's YAMLLoRALoader. If you're doing Wan video, YAMLLoRASelector emits the actual WANVIDLORA type. The Full node is the "give me everything at once" convenience, not the modular answer.
Installing
Either way it's a two-minute job, and there's no requirements.txt - the pack only uses yaml, PIL, numpy and torch, all of which ComfyUI already ships:
cd ComfyUI/custom_nodes
git clone https://github.com/avocadori/ComfyUI-load-image-prompt-lora
Then restart ComfyUI. Via ComfyUI Manager, search for ComfyUI-load-image-prompt-lora and click install - same result.
Common issues
- The category dropdown is empty. Your
setting.yamlisn't in the working directory ComfyUI was started from. Either launch from the folder that has it, or just type the category name manually - it works either way. - "Folder not found."
parent_dir+categoryhas to resolve to a real subfolder, and names are case-sensitive. Check you didn't writeCharacter1when the folder ischaracter1. - LoRA warnings in the console. The Full node's existence check is the manual path-walk, so it can miss
models/loraseven when your LoRAs are fine. If that bugs you, use YAMLLoRALoader or YAMLLoRASelector, which query ComfyUI's own lora list properly. - It restarts the loop when you reload the workflow. The cursor lives on the node in memory; reopen the workflow and you're back at image one. That's expected, not a bug.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| yaml_path | STRING | setting.yaml | — |
| parent_dir | STRING | ./data | — |
| category | STRING | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| prompt | STRING | — |
| lora1 | STRING | — |
| lora2 | STRING | — |
| lora3 | STRING | — |