Nodes/ComfyUI_KubaNodes/kubakub load images from dir
ComfyUI Node

kubakub load images from dir

Loads the images of a folder, with their names, for batch jobs: each image runs through the graph on its own (list outputs), or all together as one batch. Can filter by name and skip images that already have a finished .glb.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub load images from dir
    • IMAGE
    • MASK
    • filename
    • subfolder
    • source_path
    • total_count
    • current_index
    • image_batch
    • mask_batch
    • loaded_count
    ◄directory►
    ◄image_load_cap1►
    ◄start_index0►
    ◄load_alwaysfalse►
    ◄include_subfolderstrue►
    ◄subfolder_prefixtrue►
    ◄name_filter►
    ◄skip_existing_in►
    ◄batch_fitresize_to_first►
    Categorykubakub/utils

    Inputs (9)

    NameTypeDefaultDescription
    directorySTRINGThe folder to load .jpg, .png, .webp and .bmp images from, sorted by name (frame_2 before frame_10). Empty = a built-in sample folder: 12 frames of the sample facade.
    image_load_capoptINT1How many images to load per run. 0 = all of them; the default 1 loads one image.
    start_indexoptINT00–18446744073709550000Which image to start at (0 = the first), counted after the name filter and skipping.
    load_alwaysoptBOOLEANfalseReload on every Queue. Off reloads only when the settings or the folder's files change.
    include_subfoldersoptBOOLEANtrueAlso load images from folders inside the folder.
    subfolder_prefixoptBOOLEANtruePut the subfolder name in front of the filename output (subfolder_name), so names from different folders do not clash.
    name_filteroptSTRINGOnly load files whose name contains this text (any case); * and ? work as wildcards. Empty = all files.
    skip_existing_inoptSTRINGA folder of finished .glb files: images that already have a .glb of the same name there are skipped. Empty = skip nothing.
    batch_fitoptCOMBOresize_to_firstimage_batch / mask_batch: how images of other sizes join the first one's size. The list outputs are unchanged.

    Outputs (10)

    NameTypeDescription
    IMAGEIMAGEone image per list item
    MASKMASKone mask per list item (1 = transparent)
    filenameSTRINGeach image's name without extension (with the subfolder in front when subfolder_prefix is on)
    subfolderSTRINGeach image's subfolder inside the folder (empty for the folder itself)
    source_pathSTRINGeach image's full file path
    total_countINThow many images the folder has after the filter and skipping
    current_indexINTthe index the loading started at
    image_batchIMAGEall loaded images as one batch
    mask_batchMASKall masks as one batch
    loaded_countINThow many images this run loaded (the frames in image_batch)