From 1cd88a03dde473e4f9039fa00489a5d43ea2b013 Mon Sep 17 00:00:00 2001 From: bigcat88 Date: Wed, 7 Jan 2026 10:21:23 +0200 Subject: [PATCH] add price badge for WanReferenceVideoApi node --- comfy_api_nodes/nodes_wan.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/comfy_api_nodes/nodes_wan.py b/comfy_api_nodes/nodes_wan.py index 52129ec6d..a1355d4f1 100644 --- a/comfy_api_nodes/nodes_wan.py +++ b/comfy_api_nodes/nodes_wan.py @@ -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