Credit Tracker Logger
Know what your Nano Banana habit actually costs
- summary
The name sounds like a bank, but the reality is blunter: this node does nothing to your image. It's a bookkeeping node for the metered half of ComfyUI. If you're running ComfyUI's Partner/API Nodes - Nano Banana, Seedance, Veo, Kling, Runway, that whole storefront of closed models that run on prepaid credits - ComfyUI will happily burn those credits without telling you who spent what. This is the node that pins a project and a price tag to every run.
The context matters here. Partner Nodes are the official, vetted way to call models you can't download (no open weights for Nano Banana or Veo, ever), and the KB's external-api-nodes.md lays out the economics: cost is per call, it adds up faster than people expect, and a video job like a Seedance clip or a Veo second is where a session gets expensive fast. If you're a one-person tinkerer, you can live in the Comfy account panel. If you're tracking spend for a client, a department, or a cost center - which is exactly what this pack was built for - you want a row in a database with the project name on it.
How it works
CreditTrackerLogger is an output node. Every time the workflow executes, it looks up partner_node_name in the pack's pricing_table.json, computes an estimated credit count, converts to USD, and writes one row to SQLite (usage_log.db, created automatically in the pack folder on first run). It returns a human-readable summary string.
Three pricing modes cover the ways Partner Nodes actually bill: fixed_per_run (credits × quantity), per_second (credits_per_second × duration × quantity, for Seedance-style video), and per_output. If the name isn't in the table, the row still gets logged with pricing_mode = unknown and estimated_credits = 0. USD conversion uses a single hardcoded constant - CREDITS_PER_USD = 211.0 in tracker_db.py - so if your estimate looks off after a Comfy pricing change, that's the one line to edit.
One nice detail in the source: the node's IS_CHANGED returns the current time, which forces ComfyUI to actually run it every queue, so repeated identical runs still get logged instead of being cached away as "nothing changed."
The inputs that matter
Eight string/number inputs, and you only really set three:
partner_node_name- the lookup key into the pricing table, and the one that bites. If you leave the defaultUnknown Partner Node, the node skips logging entirely and returns a warning telling you to fill it in or rely on automatic tracking. It won't silently pollute your database with junk rows.project_name- client, department, or cost center. Defaults toGeneral.user_name- who ran it. Defaults toUnknown.
Then quantity (default 1), duration_seconds (for per-second pricing), and the optional resolution / notes fields for later review. workflow_name defaults to Untitled Workflow.
The single output, summary, is a STRING like Logged Seedance 2.0 for project Aramco: 600 credits estimated, approx $2.84. Wire it into a text-display node or just let it print on the canvas.
Install
One install gives you both nodes in this pack. ComfyUI Manager is the easy path - search "Credit Tracker" - or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/brick-momen-sirri/comfyui_credit_tracker
Then restart ComfyUI. No model downloads, no pip installs: requirements.txt is explicitly standard-library only, and the pack leans on Pillow/numpy/torch that ComfyUI already ships.
Honest gotchas
- The pack also registers an automatic tracker - a prompt hook that logs executed API nodes without you adding anything to the graph. If you just want spend numbers and don't need project/user metadata, automatic mode already has you covered; the Logger exists for when you want to control the tags. Automatic mode defaults to
project_name = General,user_name = Unknown. - A live browser dashboard ships with the pack at
http://127.0.0.1:8188/credit-tracker- total credits, top projects, CSV exports. The node and the dashboard read the same database. - Write permission matters. If ComfyUI can't write inside the extension folder, the node returns a warning summary instead of crashing - that's by design, but it means a silently empty database. Check the ComfyUI console for the reason.
This is a "when you need it, you need it" node. It's not overhyped - it's a log line with a price tag, and for anyone billing clients or running a small team off prepaid credits, that log line is the whole point.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| project_name | STRING | General | — |
| user_name | STRING | Unknown | — |
| workflow_name | STRING | Untitled Workflow | — |
| partner_node_name | STRING | Unknown Partner Node | — |
| quantity | INT | 10–1000000 | — |
| duration_seconds | FLOAT | 0.00–1000000 | — |
| resolution | STRING | — | |
| notes | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| summary | STRING | — |