INNER CODE UNIT · Python
IS_CHANGED
gokayfem/ComfyUI-fal-API · nodes/billing_node.py:73
def IS_CHANGED(cls, **kwargs: Any) -> Any:
# The balance changes outside the graph; always re-run.
return float("nan")
def check(self, force_refresh: bool = False) -> tuple[str, float]:
try:
balance = BillingUtils.get_balance(force=bool(force_refresh))
settings = SpendGuard.settings()
report = _build_report(balance, settings)
except Exception as err: # This node must never fail the graph.
logger.warning("FalBalance: could not build balance report: %s", err)
balance = None
report = f"fal account balance: unavailable ({err})\n{_UNAVAILABLE_HINT}"
return (report, float(balance) if balance is not None else -1.0)
NODE_CLASS_MAPPINGS = {
"FalBalance_fal": FalBalance,