Nodes/comfyui-credit-tracker/Credit Display (from strings)
ComfyUI Node

Credit Display (from strings)

The same credit estimator, but you feed it strings

By Av007·Created 5 months ago·Updated 5 months ago· 0
Credit Display (from strings)
    • cost_text
    • total_credits
    • total_usd
    modelSeedance 2.0 Fast (i2v/t2v)
    resolution480p
    aspect_ratio16:9
    duration_s5.0
    runs1

    Credit Display (from strings) is the sibling of the plain Credit Display node in the same pack, and the difference is exactly what the name says: instead of dropdown pickers for model, resolution and aspect ratio, it accepts those as plain STRING inputs. If you just want to check what one Seedance run will cost, use the dropdown version. If you want the model choice to come from somewhere else in the graph, this is the one.

    That's a narrower job than it sounds, but it's a real one. People build ComfyUI workflows as reusable templates - a video pipeline you hand to someone else, or a graph where the model name is itself a parameter driven by a text widget or a PrimitiveNode upstream. The dropdown node fights you there because it wants to be the source of truth. This version lets the value flow in over a wire, which is how you get one workflow that switches between Seedance, Kling and Veo by changing a single string.

    What you get (and give up)

    The five required inputs are the same as the main node - model, resolution, aspect_ratio, duration_s (1–120 s), runs - but the first three are free-form strings rather than menus. What you give up is the balance plumbing: no check_balance, no block_if_insufficient, no trigger or shared-input extras. This node is the pure estimator, and it shows - three outputs instead of four: cost_text, total_credits, and total_usd. No balance_after, so if you need the live-balance check or the queue-blocker, this isn't the one to reach for.

    Behind the scenes it's the identical math as its sibling: the same _calc_cost and _format_output functions in nodes.py, the same PRICING table with its four billing flavors (flat per run, per second, and the Seedance token formulas). It just skips the balance check entirely.

    The gotcha: strings are exact

    Because model is a free text field, you have to type the key exactly as it appears in the pack's pricing table - parens and all. "Seedance 2.0 Fast (i2v/t2v)", not "Seedance 2.0 fast" or "seedance 2.0". Miss it and the node doesn't crash; it prints ERROR: Unknown model: <what you typed> as its cost_text output and returns 0.0 for credits and USD. The node is tolerant, the pricing dict isn't.

    That makes this the node for repeatable, parameterized workflows - not the casual drag-in. If you're just eyeballing a single configuration, the dropdown sibling is friendlier and also throws in the balance check for free.

    Install

    Same pack, same story as Credit Display:

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

    Then restart ComfyUI. Or use ComfyUI Manager and search for the pack title "comfyui-credit-tracker" / "custom_fns". No pip install, no model files - it's pure Python stdlib, so it won't drag dependency hell into your environment the way heavier custom nodes do. The only caveat is that partner pricing lives in a hardcoded PRICING dict (mirrored in the JS), so the numbers are a snapshot of Comfy's pricing page on the day the pack was updated - expect them to drift if Comfy changes rates.

    Categoryutils/cost

    Inputs (5)

    NameTypeDefaultDescription
    modelSTRINGSeedance 2.0 Fast (i2v/t2v)
    resolutionSTRING480p
    aspect_ratioSTRING16:9
    duration_sFLOAT5.01–120
    runsINT11–100

    Outputs (3)

    NameTypeDescription
    cost_textSTRING
    total_creditsFLOAT
    total_usdFLOAT