Nodes/ComfyUI Ino Nodes/Ino Count Files
ComfyUI Node

Ino Count Files

How many files actually landed? Ino Count Files does the counting for you

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Count Files
    • success
    • message
    • rel_path
    • abs_path
    • count
    enabledtrue
    parent_folder
    folder
    recursivetrue

    If you've ever built a ComfyUI workflow that downloads things, renders batches, or stages files for upload, you know the pain this node removes: the moment where you stare at a folder and wonder whether everything finished. Ino Count Files answers that with a number, so the rest of your graph can act on it instead of you babysitting the process.

    It's part of the Ino Nodes pack from nobandegani, a big set of "production" utility nodes that are built around one consistent convention: every file node takes a parent_folder dropdown, a folder, and sometimes a filename, and returns the same success / message / rel_path / abs_path quartet. Learn one of them and you've basically learned all of them. Count Files is the simplest member of that family, and honestly one of the most useful for automation.

    What it does

    You give it a location and it tells you how many files are there. That's the whole job. Under the hood it resolves your parent_folder choice against ComfyUI's real directories (input, output, or temp), then counts entries in the folder. The recursive toggle (on by default) decides whether it also counts files in subfolders - flip it off if you only care about the top level.

    The inputs that matter:

    • parent_folder - the ComfyUI root to search under: input, output, or temp. This is the pack's standard way of saying "relative to ComfyUI."
    • folder - the subfolder path under that root. Leave it empty to count the root itself.
    • recursive - count subfolders too, or just the immediate directory.

    Outputs: count is the number you actually want, an INT you can wire into a Compare Int, a switch, or any logic node. success, message, rel_path and abs_path are the pack's standard reporting outputs - handy for logging or for deciding whether to proceed at all (0 files is a perfectly good "abort the pipeline" signal).

    Where it shines

    The classic use is a download-and-process loop: your HuggingFace or HTTP download nodes dump files into a folder, and a downstream step only fires once count crosses a threshold. You can also use it as a cheap sanity check after a batch render - count the output folder and compare it to the number of images you expected. Because it's async and reads nothing but the filesystem, it costs basically nothing to add to a workflow.

    Installing it

    Ino Count Files arrives with the whole Ino Nodes pack, so install that once. ComfyUI Manager is the easy route - search for "ComfyUI Ino Nodes" and install, then restart ComfyUI. Or clone by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
    cd comfyui_ino_nodes
    pip install -r requirements.txt
    

    Restart after. Two gotchas up front: this pack is built entirely on ComfyUI's newer V3 node schema and wants a recent ComfyUI (README says v0.18.1+), so if nothing shows up, your ComfyUI is too old. And the real dependency is inopyutils, a helper library by the same author that every node in the pack imports - the README is explicit that it's required, so don't skip pip install -r requirements.txt.

    Common issues

    The failures here are all "wrong path" failures, and the message output tells you exactly what went wrong - read it before you go hunting. An empty folder counts the root of parent_folder, which is sometimes more files than you bargained for. And note recursive defaults to true: if you expected 12 files and got 400, that's subfolders being counted, not a bug. To find the node, search "Ino Count Files" in the node menu, or just type "ino" - the pack's nodes are grouped under their category (InoFileHelper here).

    CategoryInoFileHelper

    Inputs (4)

    NameTypeDefaultDescription
    enabledBOOLEANtrue
    parent_folderCOMBO3 options: input, output, temp
    folderSTRING
    recursiveBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    successBOOLEAN
    messageSTRING
    rel_pathSTRING
    abs_pathSTRING
    countINT