mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-22 23:17:34 +08:00
Compare commits
4 Commits
9a939009ae
...
a46f3a3afd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a46f3a3afd | ||
|
|
e9652dbd53 | ||
|
|
8eee5ae2af | ||
|
|
fc046b75c9 |
@ -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}
|
||||
)
|
||||
""",
|
||||
|
||||
@ -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}
|
||||
)
|
||||
""",
|
||||
),
|
||||
|
||||
@ -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}
|
||||
)
|
||||
""",
|
||||
)
|
||||
|
||||
@ -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}""",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user