Nodes/CRT-Nodes/Image Loader Crawl (CRT)
ComfyUI Node

Image Loader Crawl (CRT)

Load every image in a folder one at a time, without touching the graph

By PGCRT·Created 2 years ago·Updated a day ago· 132
Image Loader Crawl (CRT)
    • image_output
    • file_name
    • file_path
    • total_images
    • sidecar_txt_prompt
    folder_path
    seed0
    crawl_subfoldersfalse
    remove_extensionfalse

    The boring problem that kills batch workflows: you've got 200 reference images and you want to run the same generation over all of them, one render at a time, without rebuilding the graph or manually dragging a new file in every run. That's exactly what Image Loader Crawl (CRT) exists for. It hands you whatever image lives at position seed inside a folder, so a single workflow can chew through an entire directory by just ticking a counter.

    It's part of the "Crawl" family in CRT-Nodes - a large, production-oriented suite by the CRT/PGC crew. The name is literal: the node crawls a folder on first use, indexes what it finds, and serves files back to you by index. No API, no setup beyond pointing at a folder.

    How it works

    The first time you run it, the node scans folder_path for images (png, jpg, jpeg, bmp, tif, webp and friends), sorts the list, and caches it along with the folder's modification time. When the folder's mtime changes - you add or delete a file - the cache invalidates and it rescans. Selection is dead simple: seed % number_of_files picks the image. That's why seed here is an index, not a random seed. Change it by one, get the next image.

    The inputs and outputs that matter

    You only really set three things:

    • folder_path - an absolute path to the folder. No tilde expansion, no relative-path magic; give it a real path.
    • seed - the file index. This is the control you'll drive from a counter or an Int node to step through the folder.
    • crawl_subfolders - on, it recursively includes subdirectories; off, just the top level.

    remove_extension trims the extension off the filename output if you need a clean name (say, for a save node's filename).

    It outputs image_output (an IMAGE you can pipe straight into a VAE encode, a ControlNet, or a preview), file_name and file_path (handy for saving results back with a matching name), and total_images (how many files it found - useful for loop math).

    Where you'll actually use it

    • Batch processing: run the same fix/upscale/generation over a dataset by incrementing seed between runs. A seed-incrementing loop node + this = poor man's batch queue.
    • Hires passes: feed a folder of reference frames into an img2img or upscale workflow.
    • Consistency tests: walk through a character reference folder while a LoRA stays fixed.

    Install and gotchas

    Install is the pack-level story: ComfyUI Manager, search CRT-Nodes, install, restart - or clone https://github.com/PGCRT/CRT-Nodes into ComfyUI/custom_nodes and restart. It's a big pack with a big dependency list (opencv, scipy, ultralytics, librosa and friends), so expect the first install to pull a lot.

    Two gotchas that bite people:

    • It doesn't crash on a bad folder - it fakes it. Empty path, missing folder, or zero images returns a blank 512×512 image with something like "Error: Folder not found" in file_name. Your run won't error out, so if you're getting mysterious blank outputs, check what file_name actually says.
    • Seed wraps. Set seed to 150 on a 12-image folder and you get image 6. Great for looping, confusing if you expected an error.
    • If you edit files in place without adding or deleting, the mtime cache stays valid - fine for most uses, just know it's mtime-driven.
    CategoryCRT/Load

    Inputs (4)

    NameTypeDefaultDescription
    folder_pathSTRING
    seedINT00–18446744073709550000
    crawl_subfoldersBOOLEANfalse
    remove_extensionBOOLEANfalse

    Outputs (5)

    NameTypeDescription
    image_outputIMAGE
    file_nameSTRING
    file_pathSTRING
    total_imagesINT
    sidecar_txt_promptSTRING