Nodes/feidorian-ComfyNodes/FD Workflow Image Loader
ComfyUI Node

FD Workflow Image Loader

One image per queue, pulled straight out of your output folder

By Feidorian·Created 3 years ago·Updated 7 months ago· 5
FD Workflow Image Loader
    • image
    • mask
    • prompt_text
    sub_directory
    selection_moderandom

    If you've ever had a stack of reference photos you wanted run through the same img2img or restoration workflow, you know the boring part: loading them one by one, or building a loop you have to babysit. Feidorian_WorkflowImageLoader is the simple version of the FD pack's answer to that - every time you hit Queue, it hands you one image from a folder, marks it done, and the matching saver writes the result back out under the source file's name. Rinse, repeat, and the folder is the queue.

    It's the plain sibling of FD Workflow Image Loader Advanced. Same core idea, one big difference: instead of a fixed internal directory, you tell it where to look with a sub_directory string, and it reads from ComfyUI/output/<sub_directory>. Drop your images there and it'll walk through them.

    How it works. On each run it lists the directory, skips anything that isn't a valid image (a is_valid_image check quietly drops corrupt files), reverts any processed_ orphan from a failed earlier run back to its original name, and filters out anything already tagged. Then it picks one file - selection_mode is random by default, or linear, which takes the first entry in the listing. It reads the PNG's prompt_text metadata, renames the file to processed_<name>, and returns image, mask, and prompt_text.

    Because the chosen file gets renamed out of the candidate list, even "linear" naturally advances through the folder one queue at a time. And like everything in this pack's manager system, IS_CHANGED returns NaN, which forces a fresh execution every run - no cached replay.

    Inputs that matter. Only two: sub_directory (required - the subfolder under output where your images live) and selection_mode. That's the whole config surface, and it's refreshingly small.

    Outputs. image (IMAGE) and mask (MASK, the alpha channel inverted - 1 = transparent) wire into any img2img or compositing path. prompt_text is the caption embedded in the source PNG, which is how a batch keeps its prompts per-image instead of hardcoding one. If you're doing a pipeline where every image gets its own caption, that output is the point.

    The gotcha to know. When the folder runs out of unprocessed files, the loader raises "No Unprocessed File Found in directory!" - that's the batch completing, not a crash. And this node is strictly half of a pair: run it without Feidorian_WorkflowImageSaver and you get a processed_ file with no product_ result, which the next run will silently revert and re-queue.

    Common issues. The saver throwing "Missing Path. Path must be provided to loader node." means it ran without the loader in the same session - the two share state, so keep them in one graph. And don't expect updates: the pack is archived, so this is the final version.

    Install. ComfyUI Manager (search "feidorian-ComfyNodes"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Feidorian/feidorian-ComfyNodes
    

    Restart ComfyUI after. No requirements.txt and no model files, so the install is genuinely painless - this is one of the rare custom nodes you can add blind.

    Categoryfeidorian/workflow-manager

    Inputs (2)

    NameTypeDefaultDescription
    sub_directorySTRING
    selection_modeCOMBOrandom2 options: linear, random

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    prompt_textSTRING