Nodes/Plush-for-ComfyUI/GPT Image🧸
ComfyUI Node

GPT Image🧸

OpenAI's gpt-image-1 generation and editing inside ComfyUI

By glibsonoran¡Created 3 years ago¡Updated about a year ago¡ 197
GPT Image🧸
  • image
  • mask
  • image
  • help
  • troubleshooting
◄GPTmodel▾►
◄image_size1024x1024►
◄image_qualityhigh►
◄batch_size1►
◄seed0►
◄Number_of_Triesdefault►
◄prompt—►

GPT Image drops OpenAI's gpt-image-1 model right into a ComfyUI graph. This is the newest of OpenAI's image models, the one behind the "make this into a Ghibli scene" wave, and it's genuinely good at following instructions and rendering legible text. It also does image editing: hand it an image and a mask and it'll paint into the masked region. If you want that model's output but you'd rather stay in ComfyUI than bounce to a chat window, this is the node.

Worth being clear-eyed: this is a paid, closed API. The image never renders on your GPU, it renders on OpenAI's servers and comes back over the wire. You're paying per image, and the quality/cost knobs matter.

How it works

You give it a prompt (and optionally a reference image and mask), it hits the OpenAI API, and the result comes back as a normal ComfyUI IMAGE you can pipe anywhere. Text-to-image if you only pass a prompt; image editing if you pass an image plus a mask. Right now the node only outputs images, no accompanying text.

The inputs that matter

  • prompt (optional, multiline): what you want. gpt-image-1 is strong at literal instruction-following, so be direct.
  • image and mask (both optional): supply both to edit. The mask marks the region to regenerate. Leave them empty for pure text-to-image.
  • image_size: 1024x1024, 1536x1024, or 1024x1536. Square or the two landscape/portrait options.
  • image_quality: low, medium, or high (default high). This is a direct cost lever. Low is cheap and fine for iterating; high for the final. Don't burn high-quality credits on test runs.
  • batch_size (1 to 8): how many images per run. Also a direct multiplier on cost.

Outputs are image, plus help and troubleshooting text.

The one thing that will block you

gpt-image-1 requires a paid OpenAI API key and your OpenAI organization has to be ID-verified to access the model. That's an OpenAI account requirement, not a Plush thing, and it catches people off guard because a normal paid key isn't enough on its own. Store the key in the OPENAI_API_KEY (or OAI_KEY) environment variable. If the node errors about access to the model despite a valid key, org verification is almost always the reason.

Installing it

Get Plush-for-ComfyUI through ComfyUI Manager (search "Plush", install Plush-for-ComfyUI, restart), or clone it manually: cd ComfyUI/custom_nodes && git clone https://github.com/glibsonoran/Plush-for-ComfyUI.git, then pip install -r requirements.txt inside the folder, restart. The pack wants the OpenAI python library 1.3.5 or newer, which requirements.txt installs.

Common issues

Beyond the org-verification wall, the usual suspects are the same as any paid-API node. Key not set or not visible after you added it (env vars often need a machine reboot to register). Content-policy refusals, since OpenAI will bounce prompts it considers unsafe even when the subject seems tame. And cost surprises, which is why image_quality and batch_size deserve a second look before you queue a big run. Set a dollar limit on the key in your OpenAI account settings so a mistake or a leak can't run up a bill. If a generation fails, the Number_of_Tries field retries, and the troubleshooting output carries the actual error message; wire a text display to it and read what OpenAI actually said.

CategoryPlush🧸/Image_Gen

Inputs (9)

NameTypeDefaultDescription
GPTmodelCOMBO1 options: gpt-image-1
image_sizeCOMBO1024x10243 options: 1024x1024, 1536x1024, 1024x1536
image_qualityCOMBOhigh3 options: low, medium, high
batch_sizeINT11–8—
seedINT00–18446744073709550000—
Number_of_TriesCOMBOdefault6 options: 1, 2, 3, 4, 5, default
imageoptIMAGE—
maskoptMASK—
promptoptSTRING—

Outputs (3)

NameTypeDescription
imageIMAGE—
helpSTRING—
troubleshootingSTRING—