ComfyUI Extension: comfyui-credit-tracker
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Pre-flight cost estimator with live balance check for ComfyUI Partner Nodes
README
custom — ComfyUI Custom Nodes
This repository contains custom nodes for ComfyUI.
Installation
Copy the desired folder(s) from custom_nodes/ into your ComfyUI installation's custom_nodes/ directory, then restart ComfyUI:
cp -r custom_nodes/credit_tracker /path/to/ComfyUI/custom_nodes/
Or clone this repo directly inside ComfyUI/custom_nodes/ and restart:
cd /path/to/ComfyUI/custom_nodes
git clone <this-repo-url> comfyui-credit-tracker
No pip install is required — the package uses Python stdlib only.
Nodes
credit_tracker — Pre-flight cost estimator with live balance check
Shows estimated Comfy Credits (and USD equivalent) for a Partner Node generation before you queue it, fetches your live balance, and can optionally block the run if funds are insufficient.
ComfyUI tracks actual spend in Settings → Credits. This node estimates before queuing so you catch expensive configurations early.
ComfyUI nodes registered
| Node | Category | Use |
|---|---|---|
| Credit Display | utils/cost | Dropdown pickers for model, resolution, aspect ratio, duration, runs + balance check + optional queue block |
| Credit Display (from strings) | utils/cost | Same calculation but accepts raw STRING inputs — pipe values from other nodes |
Outputs
| Output | Type | Description |
|---|---|---|
| cost_text | STRING | Formatted multi-line summary → wire to ShowText\|pysssss |
| total_credits | FLOAT | Total Comfy Credits |
| total_usd | FLOAT | USD equivalent (total_credits ÷ 211) |
| balance_after | FLOAT | Remaining balance after this run (−1.0 if balance check disabled or failed; only on Credit Display) |
Optional inputs (wired)
| Input | Purpose |
|---|---|
| trigger (*) | Any upstream output (IMAGE, VIDEO, STRING…); enforces execution order so cost recalculates after the real node runs |
| aspect_ratio_in | Wire a PrimitiveNode to share aspect ratio with an upstream video node |
| resolution_in | Same, for resolution |
Widgets
check_balance— fetch live balance from ComfyUI's local API (/api/credits,/internal/credits, etc.). Falls back gracefully when not logged in.block_if_insufficient— when ON and balance < cost, raises aRuntimeErrorbefore the paid node runs so no credits are spent on a failed queue.
Connecting to ShowText
[CreditDisplay] ──cost_text──► [ShowText|pysssss]
Requires pythongosssss/ComfyUI-Custom-Scripts for ShowText|pysssss.
Example output (Seedance 2.0 Fast, 480p 16:9, 5 s, balance ON)
Model : Seedance 2.0 Fast — image/text→video (ByteDance)
Settings : 480p 16:9 854×480 5.0s ×1 run(s)
Per run : 56.78 cr ($0.2691)
Total : 56.78 cr ($0.2691)
Balance : 1024.00 cr ($4.8530)
After run : 967.22 cr ($4.5839)
Status : OK
Rate : 211 cr = $1 USD | https://docs.comfy.org/tutorials/partner-nodes/pricing
Supported models
Pricing source: https://docs.comfy.org/tutorials/partner-nodes/pricing
Conversion: 211 Comfy Credits = 1 USD
ByteDance
| Model key | Rate | Billing | |---|---|---| | Seedance 2.0 Fast (i2v/t2v) | 1.182 cr / K tokens | pixel-temporal formula | | Seedance 2.0 Fast (v2v) | 0.696 cr / K tokens | pixel-temporal formula | | Seedance 2.0 (i2v/t2v) | 1.477 cr / K tokens | pixel-temporal formula | | Seedance 2.0 (v2v) | 0.907 cr / K tokens | pixel-temporal formula | | Seedance 1.5 Pro (no audio) | 253.2 cr / 1M tokens | estimated | | Seedance 1.5 Pro (with audio) | 506.4 cr / 1M tokens | estimated | | Seedance 1.0 Pro (i2v/t2v) | 527.5 cr / 1M tokens | estimated | | Seedance 1.0 Pro Fast (i2v/t2v) | 211.0 cr / 1M tokens | estimated | | Seedance 1.0 Lite (i2v/t2v) | 379.8 cr / 1M tokens | estimated | | Seedream 4.5 (t2v) | 211.0 cr / 1M tokens | estimated |
Seedance 2.0 token formula (official):
tokens = (in_dur + out_dur) × height × width × 24fps ÷ 1024
When input is text, image, or audio,in_dur = 0.
Seedance 1.x token formula is not published by ByteDance; the same formula is used as a best estimate (within ~10–20%).
Kuaishou (Kling)
| Model key | Rate | Billing | |---|---|---| | Kling v2.1 Master Pro | 295.4 cr / run | flat | | Kling v2.1 Pro | 103.39 cr / run | flat | | Kling v2.1 Standard | 59.08 cr / run | flat | | Kling v1.6 Pro | 103.39 cr / run | flat | | Kling v1.6 Standard | 59.08 cr / run | flat | | Kling v2.6 Pro (no audio) | 14.77 cr / sec | per second | | Kling v2.6 Pro (with audio) | 29.54 cr / sec | per second |
| Model key | Rate | Billing | |---|---|---| | Veo 2 | 105.5 cr / run | flat | | Veo 3 Fast (no audio) | 168.8 cr / run | flat | | Veo 3 Fast (with audio) | 253.2 cr / run | flat | | Veo 3 (no audio) | 337.6 cr / run | flat | | Veo 3 (with audio) | 675.2 cr / run | flat |
OpenAI
| Model key | Rate | Billing | |---|---|---| | Sora 2 (720p) | 21.10 cr / sec | per second | | Sora 2 Pro (720p) | 63.30 cr / sec | per second | | Sora 2 Pro (1080p) | 105.50 cr / sec | per second |
Pika
| Model key | Rate | Billing | |---|---|---| | Pika 2.2 i2v 5s 720p | 42.2 cr / run | flat | | Pika 2.2 i2v 5s 1080p | 94.95 cr / run | flat | | Pika 2.2 i2v 10s 720p | 126.6 cr / run | flat | | Pika 2.2 i2v 10s 1080p | 211.0 cr / run | flat |
Minimax
| Model key | Rate | Billing | |---|---|---| | Minimax Hailuo-02 6s 768P | 59.08 cr / run | flat | | Minimax Hailuo-02 6s 1080P | 103.39 cr / run | flat |
Luma
| Model key | Rate | Billing | |---|---|---| | Luma Ray 2 | 1.93 cr / sec | per second | | Luma Ray Flash 2 | 0.66 cr / sec | per second |
Moonvalley
| Model key | Rate | Billing | |---|---|---| | Moonvalley i2v 5s | 316.5 cr / run | flat | | Moonvalley i2v 10s | 633.0 cr / run | flat |
BFL (Flux)
| Model key | Rate | Billing | |---|---|---| | Flux Dev | 5.28 cr / run | flat | | Flux Pro 1.1 | 8.44 cr / run | flat | | Flux Pro 1.1 Ultra | 12.66 cr / run | flat | | Flux Kontext Pro | 8.44 cr / run | flat | | Flux Kontext Max | 16.88 cr / run | flat |
ElevenLabs
| Model key | Rate | Billing | |---|---|---| | ElevenLabs TTS | 50.64 cr / run | flat |
Updating prices
All rates live in the PRICING dict in custom_nodes/credit_tracker/nodes.py.
The live-display JavaScript mirror lives in custom_nodes/credit_tracker/js/credit_display.js — when you change PRICING, update the matching entry in the JS PRICING object too, then restart ComfyUI.
Official source: https://docs.comfy.org/tutorials/partner-nodes/pricing
File structure
custom_fns/ ← repo root (cloned into ComfyUI/custom_nodes/)
├── __init__.py # ComfyUI entry point (exposes mappings + WEB_DIRECTORY)
├── pyproject.toml
├── .gitignore
├── README.md
├── CONFLUENCE.md
└── custom_nodes/
└── credit_tracker/
├── __init__.py # registers nodes for direct install
├── nodes.py # pricing, token formulas, node classes
└── js/
└── credit_display.js # live client-side recalculation
Portability
Pure Python stdlib — no external dependencies. To deploy to another ComfyUI instance:
# Option A — git clone directly into custom_nodes/
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/Av007/custom_fns.git custom_fns
# Option B — ComfyUI Manager → Install via Git URL
# paste: https://github.com/Av007/custom_fns
# Option C — rsync (from a local copy)
rsync -avz /local/path/custom_fns/ user@remote:/path/to/ComfyUI/custom_nodes/custom_fns/
Workflow JSONs reference the node by type: "CreditDisplay" which matches the key in NODE_CLASS_MAPPINGS; as long as the package is installed, any workflow loads cleanly.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.