Skip to main content

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 GitHub
Generates 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

ParameterData TypeRequiredRangeDescription
promptSTRINGYes-Text prompt for GPT Image (default: "")
seedINTNo0 to 2147483647Random seed for generation (default: 0) - not implemented yet in backend
qualityCOMBONo”low"
"medium"
"high”
Image quality, affects cost and generation time (default: “low”)
backgroundCOMBONo”auto"
"opaque"
"transparent”
Return image with or without background (default: “auto”)
sizeCOMBONo”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”)
nINTNo1 to 8How many images to generate (default: 1)
imageIMAGENo-Optional reference image for image editing
maskMASKNo-Optional mask for inpainting (white areas will be replaced)
modelCOMBONo”gpt-image-1"
"gpt-image-1.5"
"gpt-image-2”
GPT Image model to use (default: “gpt-image-2”)
custom_widthINTNo1024 to 3840Used only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024)
custom_heightINTNo1024 to 3840Used only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024)
Parameter Constraints:
  • When image is provided, the node switches to image editing mode
  • mask can only be used when image is provided
  • When using mask, only single images are supported (batch size must be 1)
  • mask and image must 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 NameData TypeDescription
IMAGEIMAGEGenerated or edited image(s)

Source fingerprint (SHA-256): 826d393831ee38e97dad3ea238877d0aeb5bf16778612c51cdc0ca4816efead2