Nodes/Y7Nodes for ComfyUI/Y7 Image Batch Path
ComfyUI Node

Y7 Image Batch Path

Image Batch Path<div style="font-size: 0.8em"><div id="Y7_shortdesc" style="margin-bottom: 15px;">Load a batch of images from a directory and output them as a list of image tensors with matching file paths.</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 0px; font-size: 12px;">Supports jpg, jpeg, png, and webp. Images are EXIF-transposed and converted to RGB float32 tensors.</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 0px; font-size: 12px;">Designed to pair with CaptionSaver: the <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">IMAGE_PATH</code> output tells CaptionSaver where to write each .txt file, and <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">IMAGE</code> feeds into JoyCaption (or any other VLM) for captioning.</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 0px; font-size: 12px;">Inputs:</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">image_dir</code>: Path to the directory containing images</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">batch_size</code>: Number of images to load (0 = all images in the directory)</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">start_from</code>: 1-based index of the first image to load — useful for resuming from a specific point</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">sort_method</code>: Order to load images — <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">sequential</code> (alphabetical), <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">reverse</code>, or <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">random</code></div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 0px; font-size: 12px;">Outputs (both are lists):</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">IMAGE</code>: List of image tensors (one per image)</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 20px; font-size: 12px;">- <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">IMAGE_PATH</code>: List of full file paths matching each image tensor</div></div><div style="font-size: 0.8em"><div style="margin-bottom: 8px; margin-left: 0px; font-size: 12px;">Note: When <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">sort_method</code> is <code style="border: 1px solid #666; border-radius: 3px; padding: 0px 1px; font-family: monospace; display: inline-block;">random</code>, the node re-evaluates on every run.</div></div>

By yushan777·Created about a year ago·Updated 23 days ago· 7
Y7 Image Batch Path
    • IMAGE
    • IMAGE_PATH
    image_dir
    batch_size0
    start_from1
    sort_methodsequential
    CategoryY7Nodes/CaptionTools

    Inputs (4)

    NameTypeDefaultDescription
    image_dirSTRING
    batch_sizeoptINT0Number of images to load (0 = all)
    start_fromoptINT1Start from Nth image (1 = first)
    sort_methodoptCOMBOsequential3 options: sequential, reverse, random

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    IMAGE_PATHSTRING