add price badge for WanReferenceVideoApi node

This commit is contained in:
bigcat88 2026-01-07 10:21:23 +02:00
parent c431de7367
commit 80bd2d7d86
No known key found for this signature in database
GPG Key ID: 1F0BF0EC3CF22721

View File

@ -855,6 +855,22 @@ class WanReferenceVideoApi(IO.ComfyNode):
IO.Hidden.unique_id,
],
is_api_node=True,
price_badge=IO.PriceBadge(
depends_on=IO.PriceBadgeDepends(widgets=["size", "duration"]),
expr="""
(
$rate := $contains(widgets.size, "1080p") ? 0.15 : 0.10;
$inputMin := 2 * $rate;
$inputMax := 5 * $rate;
$outputPrice := widgets.duration * $rate;
{
"type": "range_usd",
"min_usd": $inputMin + $outputPrice,
"max_usd": $inputMax + $outputPrice
}
)
""",
),
)
@classmethod