Nodes/ComfyUI-Image-Ledger/Image Ledger · Status
ComfyUI Node

Image Ledger · Status

One line that tells you how much batch is left

By Rona1do·Created 26 days ago·Updated about 18 hours ago· 1
Image Ledger · Status
    • status
    ◄campaignimage-ledger-default►

    Halfway through a 400-image batch you want one number: how many are left. Image Ledger · Status is the node that gives it to you - one widget in, one string out, no side effects.

    What it's for

    It's a readout. The Tracked Image Loader and the Visual Queue both emit a status string, so you already get this text appended to their own messages; Status exists for the times you want the number without the loader's output in the way - a monitor node dropped at the end of a graph, a counter you can eyeball in the UI, or the fastest way to answer "am I even talking to the right ledger?"

    It's also the honest answer to "did this thing work at all?" If the commit node never fired, Status will show a pile of Running and a Pending count that isn't moving.

    How it works

    It reads the ledger's SQLite database and renders a compact line:

    Pending 42  |  Running 1  |  Done 310  |  Unique 352  |  Duplicates 7
    

    Unpacking that, since the labels are terse: Pending is sources still available to pick, Running is reservations currently held, Done is sources with a committed video, Unique is the total distinct sources it tracks in that ledger, and Duplicates counts extra file paths that hash to an image it already knows about - the renamed-copy situation. The same run also pushes a much fatter dictionary to the node's UI panel (available/missing counts, failed or interrupted job counts, recorded outputs, and a revision counter), but the STRING output you can wire is the five-field line.

    Nothing about it is cached in a stale way: IS_CHANGED is deliberately always-invalidated, so every Queue re-reads the database and the number is current as of the run you just kicked off. That also means it costs you an execution on every queue even when nothing else changed - fine, it's a single SQL query.

    Inputs and outputs

    • campaign - the ledger name. Default image-ledger-default, which is what both loaders use out of the box. The loaders ship this widget hidden, so the practical failure here is a graph where someone edited the name in one place: point Status at a name no loader writes and you'll get a perfectly accurate report of a ledger with nothing in it.
    • status (output) - the line above, also shown in the node panel. Wire it into a text display or note node if you want it on screen at all times.

    It's an output node, so it runs whether or not you wire it to anything.

    Install

    Nothing node-specific. It ships in the same pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Rona1do/ComfyUI-Image-Ledger.git
    # restart ComfyUI - no extra Python packages
    

    Or via ComfyUI Manager, searching for Image Ledger. Your ledger data lives in ComfyUI/user/default/image_ledger/ledger.sqlite3, which is why this node works even when you haven't queued one of the loaders in that particular graph.

    Common issues

    "Pending 0 | Done 0 | Unique 0" on a library you know is full. You're reading the wrong ledger name, or the loader hasn't run yet this session to index the folder - the queue is populated by the loader's sync, so a brand new install genuinely does start empty.

    Counts that don't match your file count. That's content hashing doing its job: copies of the same image under two names are one Unique entry and one Duplicate.

    The number doesn't update until you queue. By design - it's a node, not a live dashboard. If you want the always-on version, that's the pack's Global Image Ledger panel in the corner of the canvas, which tracks the pending count per category without you queueing anything.

    CategoryImage Ledger

    Inputs (1)

    NameTypeDefaultDescription
    campaignSTRINGimage-ledger-default—

    Outputs (1)

    NameTypeDescription
    statusSTRING—