Documentation Index
Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHubGenerates images synchronously via OpenAI’s GPT Image endpoint. This node can create new images from text prompts or edit existing images when provided with an input image and optional mask. It supports multiple GPT Image models, including gpt-image-1, gpt-image-1.5, and gpt-image-2.
Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
prompt | STRING | Yes | - | Text prompt for GPT Image (default: "") |
seed | INT | No | 0 to 2147483647 | Random seed for generation (default: 0) - not implemented yet in backend |
quality | COMBO | No | ”low" "medium" "high” | Image quality, affects cost and generation time (default: “low”) |
background | COMBO | No | ”auto" "opaque" "transparent” | Return image with or without background (default: “auto”) |
size | COMBO | No | ”auto" "1024x1024" "1024x1536" "1536x1024" "2048x2048" "2048x1152" "1152x2048" "3840x2160" "2160x3840" "Custom” | Image size. Select “Custom” to use the custom width and height (GPT Image 2 only) (default: “auto”) |
n | INT | No | 1 to 8 | How many images to generate (default: 1) |
image | IMAGE | No | - | Optional reference image for image editing |
mask | MASK | No | - | Optional mask for inpainting (white areas will be replaced) |
model | COMBO | No | ”gpt-image-1" "gpt-image-1.5" "gpt-image-2” | GPT Image model to use (default: “gpt-image-2”) |
custom_width | INT | No | 1024 to 3840 | Used only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024) |
custom_height | INT | No | 1024 to 3840 | Used only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024) |
- When
imageis provided, the node switches to image editing mode maskcan only be used whenimageis provided- When using
mask, only single images are supported (batch size must be 1) maskandimagemust be the same size- Custom resolution (
size= “Custom”) is only supported by the gpt-image-2 model - Custom width and height must be multiples of 16
- Custom resolution aspect ratio must not exceed 3:1
- Custom resolution total pixels must be between 655,360 and 8,294,400
- Transparent background is not supported for the gpt-image-2 model
- Sizes larger than 1536x1024 (e.g., 2048x2048, 3840x2160) are only supported by the gpt-image-2 model
Outputs
| Output Name | Data Type | Description |
|---|---|---|
IMAGE | IMAGE | Generated or edited image(s) |
Source fingerprint (SHA-256):
826d393831ee38e97dad3ea238877d0aeb5bf16778612c51cdc0ca4816efead2