Credit Tracker Report Viewer
Your ComfyUI spend, rendered right on the canvas
- trigger_image
- report_image
- report_text
If the sibling CreditTrackerLogger is the receipt, this node is the quarterly statement - and unlike real statements, it lands inside your ComfyUI canvas as an image you can look at without leaving the graph. CreditTrackerReportViewer doesn't log anything. It reads the same usage_log.db SQLite file the logger (and the pack's automatic tracker) writes, aggregates the rows, and hands you two things: a rendered chart/table image and a plain-text totals summary.
It's aimed at the same person as the whole pack: someone paying real money for ComfyUI Partner/API Nodes - Nano Banana, Seedance, Veo, Kling, Runway - which all run on prepaid credits with no free tier. The KB's external-api-nodes.md spells out why the spend sneaks up on people: per-call cost, with video jobs (a Seedance clip, a Veo second) where a session gets expensive fast. The report viewer exists to answer the one question nobody wants to compute by hand: what did we actually burn, and where?
How it works
On every run the node queries the credit_usage table with a SQL GROUP BY, grouped either by partner node or by project depending on your report_view. It totals runs, quantity, credits, and estimated USD, then draws a 1280px-wide image with Pillow - a "ComfyUI Credit Tracker" title, metric cards for credits spent and estimated USD, and a top-rows table - converts it to a torch tensor, and returns it as report_image. The text output is the same data in plain form: totals plus a numbered "Top results" list.
Two implementation details worth knowing. First, the data lives outside the workflow graph, so the node's IS_CHANGED returns the current time to force a fresh render each queue - you don't have to bump an input to get new numbers. Second, it's strictly read-only on your spend, though it does make sure the database exists; if there are no rows yet you get a "No usage records found" report rather than a crash.
The inputs that matter
Most of these are filter knobs, and the defaults are sane:
report_view- the combo switch betweenBy Partner NodeandBy Project. This is the one that changes the whole shape of the report.top_n- how many rows the report shows. Default 10, max 50.project_filterandpartner_node_filter- free-text LIKE filters that narrow the report to one project or one node. Leave them empty for everything.refresh- an integer you can bump manually if the canvas preview ever looks stale.trigger_image- optional IMAGE input. Wire an API node's image output here to force the report to re-render after that node finishes. Handy if you want the statement to update when a generation completes, but it's purely a trigger.
Two outputs: report_image (IMAGE - feed it to a Save Image node or a preview, or just eyeball it in the canvas) and report_text (STRING - the totals, for text display or export).
Install
Same single install as the rest of the pack - both nodes ship together. ComfyUI Manager (search "Credit Tracker") or:
cd ComfyUI/custom_nodes
git clone https://github.com/brick-momen-sirri/comfyui_credit_tracker
Restart after. No model files, no extra pip packages - requirements.txt is standard-library only, and the Pillow/numpy/torch it leans on are already part of ComfyUI.
Troubleshooting
- "No usage records found" - nothing has logged yet. Either no Partner node ran, or the logger/auto-tracker hasn't written a row. Run a workflow that actually executes an API node first.
- Report looks stale on the canvas - the preview is rendered at execution time, not when you drop the node. Run the workflow once, or bump
refresh. - Filters doing nothing - they're
LIKEsubstring matches, so "seedance" matches a node named "Seedance 2.0". If you type a filter, the report shrinks to matching rows only. - Wrong totals - check the logger's pricing table and the
CREDITS_PER_USDconstant (211.0) intracker_db.py; this node only reports what the database says.
Worth knowing: the pack's browser dashboard at http://127.0.0.1:8188/credit-tracker shows the same data plus CSV exports, so the node is your on-canvas version of that. For a solo tinkerer burning a few credits a week, this is overkill - but if anyone ever asks you what a client's Seedance renders cost, this node answers it in one run.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| report_view | COMBO | By Partner Node | 2 options: By Partner Node, By Project |
| top_n | INT | 101–50 | — |
| project_filter | STRING | — | |
| partner_node_filter | STRING | — | |
| refresh | INT | 00–1000000 | — |
| trigger_imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| report_image | IMAGE | — |
| report_text | STRING | — |