Nodes/comfyui-superside-nodes/Superside Fal Cost Report
ComfyUI Node

Superside Fal Cost Report

Your Workflow Just Spent Real Money — Here's the Receipt

By Superside·Created 3 months ago·Updated 6 days ago· 1
Superside Fal Cost Report
  • after_image
  • report
  • total_usd
  • calls
◄scopethis run►
◄after_text—►
◄clear_after_reportfalse►

A local generation costs electricity. A fal.ai generation costs money, every single time, and it does not care that you were just testing a prompt. fal meters credits, and an empty balance simply stops generation - that's the deal when you wire an API node into your graph. The problem is that cost is invisible on the canvas: you run the thing eleven times, get a look you like, and find out later what that took.

Superside Fal Cost Report exists to make the number visible while the canvas is still open. Drop it in the graph, hit run, read the total. It's the accounting node for the rest of this pack.

How the ledger works

Every fal-backed node in this pack routes its call through one shared helper, APIClientMixin.call_api. That helper appends one entry per successful call to an in-memory ledger - node name, fal endpoint id, a price estimate, and a detail string like the output megapixels it was computed from. Nothing is wired per node: if a node in this package made the call, it's in the ledger.

The report node reads that ledger back and formats it, grouped by node and endpoint, with unpriced calls listed separately. It also returns the raw numbers on three outputs, so report (STRING) can go to a text display, total_usd (FLOAT) can drive a threshold or a log, and calls (INT) tells you how many times you actually invoked a model - which is frequently higher than you think.

The inputs that matter

scope is the only required input, and it changes the meaning of the whole node. this run counts the calls made since this report node last reported. session (since ComfyUI started) counts everything in the ledger. Each report node keeps its own cursor, so several in one graph don't trample each other's windows.

after_image (IMAGE) and after_text (STRING) are ordering hacks, and they matter. ComfyUI doesn't guarantee a node with no dependencies runs last, so an input-less report node can happily report on nothing. Wire your pipeline's last image into after_image (or any string into after_text) and the dependency forces the report to the end.

clear_after_report empties the ledger once it has printed - what you want at the end of a batch, so the next run's this run window isn't polluted by a manual re-run you did to check something.

Restart ComfyUI and search "Superside". There's no API key on this node - it never calls fal, it just reads the books. Adding it to an existing workflow doesn't invalidate anything: the other nodes' price displays are painted on the canvas rather than added as widgets, precisely so widgets_values in your saved workflows doesn't shift.

Install

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/Superside/comfyui-superside-nodes
cd comfyui-superside-nodes && pip install -r requirements.txt

Restart ComfyUI and search "Superside".

Things that will confuse you

A failed run poisons the next report. The this run cursor only advances when the report node actually executes. If a run dies before the report fires, those calls are still in the ledger and will land in the next successful report. That's not a bug, but it makes a clean-looking total hard to trust right after an error. clear_after_report is the reset button.

A restart wipes the ledger. Memory only, nothing written to disk, capped at 5000 entries. session means "since ComfyUI booted", not "since I started working".

The total is a lower bound, not an invoice. Twenty-odd endpoints in this pack publish a per-call price, computed exactly from the request and the response - output count, resolution, megapixels, video seconds, training steps. The rest are billed by GPU-second (Florence-2, Juggernaut, Bria background replace) or by tokens (GPT Image 2, Gemini Omni Flash, the AnyLLM routers), and fal publishes no per-call figure for them. Those are counted and listed, not guessed, and excluded from the total. Read the "could not be priced" block before you tell anyone what a run costs.

You can hand-price the unknowns. Read the real cost of, say, a Florence-2 call off fal's usage dashboard once and put it in MANUAL_PRICES in modules/fal_pricing.py; it then counts toward the total, labelled as measured by hand rather than published by fal.

Prices rot. fal changes them, and this pack snapshots them. There's a check for exactly that, run from the repo root:

python -m modules.fal_pricing --check

It re-reads fal's live catalogue and lists any endpoint whose published amounts no longer match, and it flags endpoints that no longer resolve. Anything it lists needs a human.

It only sees this pack. Calls from ComfyUI's own official API nodes, or another pack talking to fal directly, aren't in this ledger. If your graph mixes sources, this report covers the Superside half.

num_images, resolution, and quality are the multipliers that actually move the number, so the honest use of this node is: run the graph once with production settings, read the total, and decide whether your 40-image batch is still a good idea.

CategorySuperside

Inputs (4)

NameTypeDefaultDescription
scopeCOMBOthis run2 options: this run, session (since ComfyUI started)
after_imageoptIMAGE—
after_textoptSTRING—
clear_after_reportoptBOOLEANfalse—

Outputs (3)

NameTypeDescription
reportSTRING—
total_usdFLOAT—
callsINT—