Nodes/comfyui-AGSoft/AGSoft Loop Images
ComfyUI Node

AGSoft Loop Images

Collect up to 30 image inputs into one list for batch processing

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
AGSoft Loop Images
    • IMAGE
    number_of_images2

    AGSoft Loop Images is the image-collection sibling of the pack's Loop Fix family: it takes up to 30 separate image inputs and gathers them into a single IMAGE list. That's the whole job, and it exists for one reason - a lot of batch-processing nodes in the ecosystem (Save Image Batch, ForEach-style iterators, image comparison tools) want a list of images, and getting several images from different parts of your graph into that list shape is usually a small nightmare of list nodes.

    It's the dynamic version of the Loop Fix concept: instead of fixing the input count at 10, you set it with a slider and the node generates image_1 through image_N inputs on the fly.

    How it works

    One input to care about: number_of_images (1–30, default 2). Set it to 5 and you get five image inputs, image_1 through image_5; set it to 20 and you get twenty. Only the inputs you actually connect are collected - unconnected inputs are skipped, not turned into blank images, so you can leave a few dangling without breaking the list.

    Output: a single IMAGE list, ordered by input number. That order matters - it's the order the batch node downstream will iterate, so wire your inputs deliberately if sequence matters.

    One implementation detail worth knowing: the node always re-executes (IS_CHANGED returns a changing value) so the output reflects image changes even when the inputs don't look modified. That's the correct behavior for a collection node, and it means "why didn't my list update" is one bug you won't hit here.

    Installation

    From comfyui-AGSoft:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
    # restart ComfyUI
    

    Or ComfyUI Manager → search "comfyui-AGSoft". No models, standard pack deps.

    Where it fits

    Use it when images come from different places in your graph - a couple of loaders, a generation result, an upscale branch - and you want to hand them to a batch consumer as one list. It's the flexible counterpart to AGSoft Load Images From Dir, which fills a list from a folder instead of from your graph. If the images are already one batched IMAGE, you don't need this; if they're scattered across your workflow, this is the connector. The 30-input cap is generous for any real workflow, and the skip-empties behavior keeps the list clean.

    CategoryAGSoft/Utility

    Inputs (1)

    NameTypeDefaultDescription
    number_of_imagesINT21–30How many image inputs to create. Each input will be named image_1, image_2, etc. Example: number_of_images=3 → creates image_1, image_2, image_3 Сколько входов для изображений создать. Каждый вход будет называться image_1, image_2 и т.д. Пример: number_of_images=3 → создаются image_1, image_2, image_3

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE