ComfyUI Node

Credit Display

Know what a partner video run costs before you hit Queue

By Av007·Created 5 months ago·Updated 5 months ago· 0
Credit Display
  • trigger
  • cost_text
  • total_credits
  • total_usd
  • balance_after
modelSeedance 2.0 Fast (i2v/t2v)
resolution480p
aspect_ratio16:9
duration_s5.0
runs1
check_balancetrue
block_if_insufficientfalse
aspect_ratio_in
resolution_in

ComfyUI's partner video nodes - Seedance, Kling, Veo, Sora, Pika - don't run on your GPU. They run on someone else's, and they bill in Comfy Credits, which is real money dressed up as a loyalty program (211 credits = $1 USD, per the pricing page Comfy publishes). ComfyUI tracks what you actually spend in Settings → Credits, but only after the fact. Credit Display is the pre-flight check: it estimates the cost of a generation before you queue it, shows your live balance, and can hard-stop the run if you're about to go broke mid-queue.

That sounds like a nice-to-have until you've watched the alternative. Partner nodes price themselves in wildly different ways - flat per run for Kling and Veo, per second for Sora and Luma, token-based for the Seedance family - and the community has learned the hard way that a single refusal from an API node throws an error that kills the whole queue. Multiple API nodes in one workflow also run simultaneously, not one after another. So "let me just see what happens" is an expensive workflow strategy. This node turns that guess into a number you can read on the canvas before committing.

How it works

Under the hood it's a pure-Python calculator plus a small frontend mirror. All 41 model price entries live in a PRICING dict in nodes.py, and the billing math falls into four buckets: flat per run (Kling, Veo, Pika, Flux), per second (Sora, Luma, Kling 2.6), and two token formulas for ByteDance. Seedance 2.0 uses the official pixel-temporal formula - tokens = (in_dur + out_dur) × h × w × 24fps ÷ 1024 - while Seedance 1.x uses the same formula as a best estimate, since ByteDance never published that one. The author is upfront that 1.x numbers land within roughly 10–20% of your actual charge.

The balance check is genuinely local: with check_balance on, it polls your running ComfyUI instance at 127.0.0.1:8188 across a few API paths (/api/credits, /internal/credits, and friends). If you're not logged in or none of them respond, it fails gracefully - the output shows a dash and a log line instead of crashing. There's also a js/credit_display.js that mirrors the pricing so the cost updates live as you drag sliders, before you even queue.

The inputs that matter

You'll set five things by hand:

  • model - dropdown of 41 partner models (Seedance, Kling, Veo, Sora, Pika, Flux, ElevenLabs…)
  • resolution / aspect_ratio - 360p–1080p, 16:9 / 9:16 / 1:1
  • duration_s - 1–120 s, half-second steps
  • runs - how many generations you're batching

Then two toggles: check_balance (default on) and block_if_insufficient (default off). Three optional inputs let you wire execution order - trigger accepts any type so the cost recalculates after your real node runs, and aspect_ratio_in / resolution_in let a shared PrimitiveNode feed both this node and an upstream video node the same value.

Outputs and where they go

Four outputs: cost_text (a formatted multi-line summary), total_credits, total_usd, and balance_after. The one beginners actually want is cost_text wired into ShowText|pysssss from pythongosssss's Custom-Scripts so the estimate renders right on the canvas. balance_after comes back as -1.0 whenever balance checking is disabled or couldn't reach an endpoint - that's the sentinel, not a real balance.

With block_if_insufficient on, a shortfall raises a RuntimeError before the paid node runs. It shows up as red in the UI, which looks like a crash - it isn't. That's the feature working: no credits spent on a queue that was going to die anyway.

Install

Via ComfyUI Manager, search for the pack title ("comfyui-credit-tracker" / "custom_fns") and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Av007/custom_fns

Then restart ComfyUI. No pip install, no model downloads, no CUDA - it's Python stdlib only, which is refreshing in a pack ecosystem where dependency hell is the norm. The only extra you need is pythongosssss's Custom-Scripts if you want the ShowText display.

Gotchas worth knowing

Prices are a hardcoded snapshot in PRICING, mirrored in the JS file - if Comfy changes partner pricing, the author has to bump both and you have to update the pack to see it. And one thing this node won't tell you: Comfy Credits can't be used for Comfy Cloud time. They're separate currencies, so don't read this balance as your cloud budget.

Categoryutils/cost

Inputs (10)

NameTypeDefaultDescription
modelCOMBOSeedance 2.0 Fast (i2v/t2v)41 options: Seedance 2.0 Fast (i2v/t2v), Seedance 2.0 Fast (v2v), Seedance 2.0 (i2v/t2v), Seedance 2.0 (v2v), Seedance 1.0 Lite (i2v/t2v), Seedance 1.0 Pro (i2v/t2v), +35
resolutionCOMBO480p4 options: 360p, 480p, 720p, 1080p
aspect_ratioCOMBO16:93 options: 16:9, 9:16, 1:1
duration_sFLOAT5.01–120
runsINT11–100
check_balanceBOOLEANtrue
block_if_insufficientBOOLEANfalse
triggeropt*
aspect_ratio_inoptCOMBO3 options: 16:9, 9:16, 1:1
resolution_inoptCOMBO4 options: 360p, 480p, 720p, 1080p

Outputs (4)

NameTypeDescription
cost_textSTRING
total_creditsFLOAT
total_usdFLOAT
balance_afterFLOAT