fix: adjust price badges

Signed-off-by: bigcat88 <bigcat88@icloud.com>
This commit is contained in:
bigcat88 2026-05-07 09:19:47 +03:00
parent 6374553139
commit c8a3041bf9
No known key found for this signature in database
GPG Key ID: 1F0BF0EC3CF22721

View File

@ -120,7 +120,7 @@ class GrokImageNode(IO.ComfyNode):
expr=""" expr="""
( (
$rate := widgets.model = "grok-imagine-image-quality" $rate := widgets.model = "grok-imagine-image-quality"
? (widgets.resolution = "1k" ? 0.04 : 0.05) ? (widgets.resolution = "1k" ? 0.05 : 0.07)
: ($contains(widgets.model, "pro") ? 0.07 : 0.02); : ($contains(widgets.model, "pro") ? 0.07 : 0.02);
{"type":"usd","usd": $rate * widgets.number_of_images} {"type":"usd","usd": $rate * widgets.number_of_images}
) )
@ -246,7 +246,7 @@ class GrokImageEditNode(IO.ComfyNode):
$isQualityModel := widgets.model = "grok-imagine-image-quality"; $isQualityModel := widgets.model = "grok-imagine-image-quality";
$isPro := $contains(widgets.model, "pro"); $isPro := $contains(widgets.model, "pro");
$rate := $isQualityModel $rate := $isQualityModel
? (widgets.resolution = "1k" ? 0.04 : 0.05) ? (widgets.resolution = "1k" ? 0.05 : 0.07)
: ($isPro ? 0.07 : 0.02); : ($isPro ? 0.07 : 0.02);
$base := $isQualityModel ? 0.01 : 0.002; $base := $isQualityModel ? 0.01 : 0.002;
$output := $rate * widgets.number_of_images; $output := $rate * widgets.number_of_images;