Compare commits

...

4 Commits

Author SHA1 Message Date
bigcat88
a46f3a3afd
fixed price badges for PixVerse nodes 2026-01-11 12:56:23 +02:00
bigcat88
e9652dbd53
fixed price badge for MinimaxHailuoVideoNode 2026-01-11 12:17:09 +02:00
bigcat88
8eee5ae2af
fixed incorrect price badges for LTXV nodes 2026-01-11 11:13:46 +02:00
bigcat88
fc046b75c9
fixed incorrect price for RecraftCrispUpscaleNode 2026-01-11 10:29:38 +02:00
4 changed files with 30 additions and 52 deletions

View File

@ -32,11 +32,12 @@ PRICE_BADGE = IO.PriceBadge(
depends_on=IO.PriceBadgeDepends(widgets=["model", "duration", "resolution"]),
expr="""
(
$pps := {
$prices := {
"ltx-2 (pro)": {"1920x1080":0.06,"2560x1440":0.12,"3840x2160":0.24},
"ltx-2 (fast)": {"1920x1080":0.04,"2560x1440":0.08,"3840x2160":0.16}
}[widgets.model][widgets.resolution];
};
$modelPrices := $lookup($prices, $lowercase(widgets.model));
$pps := $lookup($modelPrices, widgets.resolution);
{"type":"usd","usd": $pps * widgets.duration}
)
""",

View File

@ -350,23 +350,13 @@ class MinimaxHailuoVideoNode(IO.ComfyNode):
depends_on=IO.PriceBadgeDepends(widgets=["resolution", "duration"]),
expr="""
(
$r := widgets.resolution;
$d := widgets.duration;
$price :=
$contains($r,"768p")
? (
$contains($d,"6") ? 0.28 :
$contains($d,"10") ? 0.56 :
0.43
)
: $contains($r,"1080p")
? (
$contains($d,"6") ? 0.49 : 0.43
)
: 0.43;
{"type":"usd","usd": $price}
$prices := {
"768p": {"6": 0.28, "10": 0.56},
"1080p": {"6": 0.49}
};
$resPrices := $lookup($prices, $lowercase(widgets.resolution));
$price := $lookup($resPrices, $string(widgets.duration));
{"type":"usd","usd": $price ? $price : 0.43}
)
""",
),

View File

@ -423,37 +423,24 @@ PRICE_BADGE_VIDEO = IO.PriceBadge(
depends_on=IO.PriceBadgeDepends(widgets=["duration_seconds", "quality", "motion_mode"]),
expr="""
(
$d := widgets.duration_seconds;
$q := widgets.quality;
$m := widgets.motion_mode;
$price :=
$contains($d,"5")
? (
$contains($q,"1080p") ? 1.2 :
($contains($q,"720p") and $contains($m,"fast")) ? 1.2 :
($contains($q,"720p") and $contains($m,"normal")) ? 0.6 :
($contains($q,"540p") and $contains($m,"fast")) ? 0.9 :
($contains($q,"540p") and $contains($m,"normal")) ? 0.45 :
($contains($q,"360p") and $contains($m,"fast")) ? 0.9 :
($contains($q,"360p") and $contains($m,"normal")) ? 0.45 :
0.9
)
: $contains($d,"8")
? (
($contains($q,"540p") and $contains($m,"normal")) ? 0.9 :
($contains($q,"540p") and $contains($m,"fast")) ? 1.2 :
($contains($q,"360p") and $contains($m,"normal")) ? 0.9 :
($contains($q,"360p") and $contains($m,"fast")) ? 1.2 :
($contains($q,"1080p") and $contains($m,"normal")) ? 1.2 :
($contains($q,"1080p") and $contains($m,"fast")) ? 1.2 :
($contains($q,"720p") and $contains($m,"normal")) ? 1.2 :
($contains($q,"720p") and $contains($m,"fast")) ? 1.2 :
0.9
)
: 0.9;
{"type":"usd","usd": $price}
$prices := {
"5": {
"1080p": {"normal": 1.2, "fast": 1.2},
"720p": {"normal": 0.6, "fast": 1.2},
"540p": {"normal": 0.45, "fast": 0.9},
"360p": {"normal": 0.45, "fast": 0.9}
},
"8": {
"1080p": {"normal": 1.2, "fast": 1.2},
"720p": {"normal": 1.2, "fast": 1.2},
"540p": {"normal": 0.9, "fast": 1.2},
"360p": {"normal": 0.9, "fast": 1.2}
}
};
$durPrices := $lookup($prices, $string(widgets.duration_seconds));
$qualityPrices := $lookup($durPrices, widgets.quality);
$price := $lookup($qualityPrices, widgets.motion_mode);
{"type":"usd","usd": $price ? $price : 0.9}
)
""",
)

View File

@ -956,7 +956,7 @@ class RecraftCrispUpscaleNode(IO.ComfyNode):
],
is_api_node=True,
price_badge=IO.PriceBadge(
expr="""{"type":"usd","usd":0.04}""",
expr="""{"type":"usd","usd":0.004}""",
),
)