Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

[Partner Nodes] feat(OpenAI): add GPT-6.1 Terra and Sol models (#17493)

Alexander Piskun8a98ecf58644
diff --git a/comfy_api_nodes/nodes_openai.py b/comfy_api_nodes/nodes_openai.py
index b4c5a81b3..53774985f 100644
--- a/comfy_api_nodes/nodes_openai.py
+++ b/comfy_api_nodes/nodes_openai.py
@@ -43,6 +43,8 @@ STARTING_POINT_ID_PATTERN = r"<starting_point_id:(.*)>"
class SupportedOpenAIModel(str, Enum):
gpt_6_astra = "gpt-6-astra"
+ gpt_6_1_sol = "gpt-6.1-sol"
+ gpt_6_1_terra = "gpt-6.1-terra"
gpt_6_sol = "gpt-6-sol"
gpt_6_luna = "gpt-6-luna"
gpt_5_6_sol = "gpt-5.6-sol"
@@ -55,11 +57,7 @@ class SupportedOpenAIModel(str, Enum):
gpt_5_nano = "gpt-5-nano"
gpt_4_1 = "gpt-4.1"
gpt_4_1_mini = "gpt-4.1-mini"
- gpt_4_1_nano = "gpt-4.1-nano"
- o4_mini = "o4-mini"
o3 = "o3"
- o1_pro = "o1-pro"
- o1 = "o1"
REASONING_EFFORT_OPTIONS = ["default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]
@@ -68,6 +66,8 @@ _GPT_5_EFFORTS = ("minimal", "low", "medium", "high")
_GPT_5_6_EFFORTS = ("none", "low", "medium", "high", "xhigh", "max")
SUPPORTED_REASONING_EFFORTS: dict[str, tuple[str, ...]] = {
SupportedOpenAIModel.gpt_6_astra: ("low", "medium", "high", "xhigh", "max"),
+ SupportedOpenAIModel.gpt_6_1_sol: ("low", "medium", "high", "xhigh", "max"),
+ SupportedOpenAIModel.gpt_6_1_terra: _GPT_5_6_EFFORTS,
SupportedOpenAIModel.gpt_6_sol: _GPT_5_6_EFFORTS,
SupportedOpenAIModel.gpt_6_luna: _GPT_5_6_EFFORTS,
SupportedOpenAIModel.gpt_5_6_sol: _GPT_5_6_EFFORTS,
@@ -80,11 +80,7 @@ SUPPORTED_REASONING_EFFORTS: dict[str, tuple[str, ...]] = {
SupportedOpenAIModel.gpt_5_nano: _GPT_5_EFFORTS,
SupportedOpenAIModel.gpt_4_1: (),
SupportedOpenAIModel.gpt_4_1_mini: (),
- SupportedOpenAIModel.gpt_4_1_nano: (),
- SupportedOpenAIModel.o4_mini: _O_SERIES_EFFORTS,
SupportedOpenAIModel.o3: _O_SERIES_EFFORTS,
- SupportedOpenAIModel.o1_pro: _O_SERIES_EFFORTS,
- SupportedOpenAIModel.o1: _O_SERIES_EFFORTS,
}
@@ -220,7 +216,7 @@ class OpenAIGPTImage1(IO.ComfyNode):
),
IO.Combo.Input(
"model",
- options=["gpt-image-1", "gpt-image-1.5", "gpt-image-2"],
+ options=["gpt-image-1.5", "gpt-image-2"],
default="gpt-image-2",
optional=True,
),
@@ -257,11 +253,6 @@ class OpenAIGPTImage1(IO.ComfyNode):
expr="""
(
$ranges := {
- "gpt-image-1": {
- "low": [0.011, 0.02],
- "medium": [0.042, 0.07],
- "high": [0.167, 0.25]
- },
"gpt-image-1.5": {
"low": [0.009, 0.02],
"medium": [0.034, 0.062],
@@ -302,7 +293,7 @@ class OpenAIGPTImage1(IO.ComfyNode):
size: str = "1024x1024",
custom_width: int = 1024,
custom_height: int = 1024,
- model: str = "gpt-image-1",
+ model: str = "gpt-image-2",
) -> IO.NodeOutput:
validate_string(prompt, strip_whitespace=False)
@@ -327,11 +318,11 @@ class OpenAIGPTImage1(IO.ComfyNode):
f"Custom resolution total pixels must be between 655,360 and 8,294,400, got {total_pixels}"
)
size = f"{custom_width}x{custom_height}"
- elif model in ("gpt-image-1", "gpt-image-1.5"):
+ elif model == "gpt-image-1.5":
if size not in ("auto", "1024x1024", "1024x1536", "1536x1024"):
raise ValueError(f"Resolution {size} is only supported by GPT Image 2 model")
- if model not in ("gpt-image-1", "gpt-image-1.5", "gpt-image-2"):
+ if model not in ("gpt-image-1.5", "gpt-image-2"):
raise ValueError(f"Unknown model: {model}")
if image is not None:
@@ -410,7 +401,7 @@ class OpenAIGPTImage1(IO.ComfyNode):
GPT_IMAGE_QUALITIES = ("low", "medium", "high")
GPT_IMAGE_25_QUALITIES = ("low", "medium", "high", "xhigh", "max")
-GPT_IMAGE_MODELS = ("gpt-image-2.5-flare", "gpt-image-2.5-sunburst", "gpt-image-2", "gpt-image-1.5", "gpt-image-1")
+GPT_IMAGE_MODELS = ("gpt-image-2.5-flare", "gpt-image-2.5-sunburst", "gpt-image-2", "gpt-image-1.5")
def _gpt_image_shared_inputs(qualities: tuple[str, ...] = GPT_IMAGE_QUALITIES):
@@ -441,7 +432,7 @@ def _gpt_image_shared_inputs(qualities: tuple[str, ...] = GPT_IMAGE_QUALITIES):
def _gpt_image_legacy_model_inputs():
- """Per-model widget set for legacy gpt-image-1 / gpt-image-1.5 (4 base sizes, transparent bg allowed)."""
+ """Per-model widget set for legacy gpt-image-1.5 (4 base sizes, transparent bg allowed)."""
return [
IO.Combo.Input(
"size",
@@ -536,7 +527,6 @@ class OpenAIGPTImageNodeV2(IO.ComfyNode):
_gpt_image_2_model_inputs(("auto", "opaque"), GPT_IMAGE_QUALITIES),
),
IO.DynamicCombo.Option("gpt-image-1.5", _gpt_image_legacy_model_inputs()),
- IO.DynamicCombo.Option("gpt-image-1", _gpt_image_legacy_model_inputs()),
],
),
IO.Int.Input(
@@ -571,11 +561,6 @@ class OpenAIGPTImageNodeV2(IO.ComfyNode):
expr="""
(
$ranges := {
- "gpt-image-1": {
- "low": [0.011, 0.02],
- "medium": [0.042, 0.07],
- "high": [0.167, 0.25]
- },
"gpt-image-1.5": {
"low": [0.009, 0.02],
"medium": [0.034, 0.062],
@@ -616,7 +601,6 @@ class OpenAIGPTImageNodeV2(IO.ComfyNode):
}
};
$perImage := {
- "gpt-image-1": [0.0019, 0.0019],
"gpt-image-1.5": [0.0016, 0.0016],
"gpt-image-2": [0.0098, 0.0147],
"gpt-image-2.5-flare": [0.0117, 0.0176],
@@ -839,34 +823,24 @@ class OpenAIChatNode(IO.ComfyNode):
"usd": [0.0143, 0.0715],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
- : $contains($m, "gpt-6-sol") ? {
+ : $contains($m, "gpt-6.1-sol") ? {
"type": "list_usd",
"usd": [0.00286, 0.0143],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
- : $contains($m, "gpt-6-luna") ? {
- "type": "list_usd",
- "usd": [0.000143, 0.000715],
- "format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
- }
- : $contains($m, "o4-mini") ? {
- "type": "list_usd",
- "usd": [0.0011, 0.0044],
- "format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
- }
- : $contains($m, "o1-pro") ? {
+ : $contains($m, "gpt-6.1-terra") ? {
"type": "list_usd",
- "usd": [0.15, 0.6],
+ "usd": [0.00143, 0.00715],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
- : $contains($m, "o1") ? {
+ : $contains($m, "gpt-6-sol") ? {
"type": "list_usd",
- "usd": [0.015, 0.06],
+ "usd": [0.00286, 0.0143],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
- : $contains($m, "o3-mini") ? {
+ : $contains($m, "gpt-6-luna") ? {
"type": "list_usd",
- "usd": [0.0011, 0.0044],
+ "usd": [0.000143, 0.000715],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
: $contains($m, "o3") ? {
@@ -874,11 +848,6 @@ class OpenAIChatNode(IO.ComfyNode):
"usd": [0.01, 0.04],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
- : $contains($m, "gpt-4.1-nano") ? {
- "type": "list_usd",
- "usd": [0.0001, 0.0004],
- "format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
- }
: $contains($m, "gpt-4.1-mini") ? {
"type": "list_usd",
"usd": [0.0004, 0.0016],
@@ -1138,10 +1107,8 @@ class OpenAIChatConfig(IO.ComfyNode):
options=REASONING_EFFORT_OPTIONS,
default="default",
optional=True,
- tooltip="How much the model reasons before answering. 'default' leaves the choice to the model. "
- "Supported levels differ per model: GPT-6 Astra low-max, GPT-6 Sol/Luna and GPT-5.6 none-max (no minimal), "
- "GPT-5.5 none-xhigh, GPT-5.5 Pro medium-xhigh, GPT-5 minimal-high, o-series low-high; "
- "GPT-4.1 has no reasoning. Unsupported levels are rejected before the request is sent.",
+ tooltip="Supported levels vary by model. An unsupported level stops the run and lists the valid ones. "
+ "'default' lets the model choose.",
),
],
outputs=[
@@ -1162,7 +1129,7 @@ class OpenAIChatConfig(IO.ComfyNode):
Note:
While `top_p` and `temperature` are listed as properties in the
- spec, they are not supported for all models (e.g., o4-mini).
+ spec, they are not supported for all models (e.g., gpt-6.1-sol).
They are not exposed as inputs at all to avoid having to manually
remove depending on model choice.
"""