Add gpt-image-2 as version option (#13501)

This commit is contained in:
AustinMroz 2026-04-21 17:58:59 -07:00 committed by GitHub
parent 102773cd2c
commit 43a1263b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -363,7 +363,7 @@ class OpenAIGPTImage1(IO.ComfyNode):
def define_schema(cls):
return IO.Schema(
node_id="OpenAIGPTImage1",
display_name="OpenAI GPT Image 1.5",
display_name="OpenAI GPT Image 2",
category="api node/image/OpenAI",
description="Generates images synchronously via OpenAI's GPT Image endpoint.",
inputs=[
@ -427,8 +427,8 @@ class OpenAIGPTImage1(IO.ComfyNode):
),
IO.Combo.Input(
"model",
options=["gpt-image-1", "gpt-image-1.5"],
default="gpt-image-1.5",
options=["gpt-image-1", "gpt-image-1.5", 'gpt-image-2'],
default="gpt-image-2",
optional=True,
),
],
@ -487,6 +487,8 @@ class OpenAIGPTImage1(IO.ComfyNode):
price_extractor = calculate_tokens_price_image_1
elif model == "gpt-image-1.5":
price_extractor = calculate_tokens_price_image_1_5
elif model == "gpt-image-2":
price_extractor = calculate_tokens_price_image_1_5
else:
raise ValueError(f"Unknown model: {model}")