mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
add price badge for WanReferenceVideoApi node
This commit is contained in:
parent
c431de7367
commit
80bd2d7d86
@ -855,6 +855,22 @@ class WanReferenceVideoApi(IO.ComfyNode):
|
|||||||
IO.Hidden.unique_id,
|
IO.Hidden.unique_id,
|
||||||
],
|
],
|
||||||
is_api_node=True,
|
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
|
@classmethod
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user