Nodes/GPT img/GPT img OAuth Edit
ComfyUI Node

GPT img OAuth Edit

Edit with GPT using your ChatGPT subscription — same result, no API key

By hub2vu·Created 4 months ago·Updated 4 months ago· 3
GPT img OAuth Edit
  • image
  • image
  • revised_prompt
promptedit this image
modelgpt-5.4
qualitymedium
size1024x1024
moderationlow
oauth_port10531
auto_start_oauthtrue
timeout_sec300

This is the sibling of GPT img API Edit for people who don't want a per-image API bill. You feed it an IMAGE, type what to change, and the edit happens via your ChatGPT/Codex login instead of an API key. Same idea as the web ChatGPT image editing you already use - now it's a node in your graph, so you can chain it after a generation, feed it a reference, and route the result wherever you like.

The one real difference from the API version is setup: OAuth nodes need Node.js and a one-time login. After that, the cost model is your subscription, not your meter.

How it works

On run, the node makes sure the local OAuth proxy is up on http://127.0.0.1:10531 (auto-starting npx -y openai-oauth if auto_start_oauth is on and waiting up to 45 seconds). It then base64-encodes your image and sends it through the proxy to OpenAI's Responses API with the image_generation tool in edit mode. The edited image streams back, gets decoded to a tensor, and lands in your workflow as a standard IMAGE.

The inputs that matter

  • image - the IMAGE tensor to edit.
  • prompt - what to change. This is the one you'll type into most runs.
  • model - defaults to gpt-5.4; the OAuth list also includes gpt-5.4-mini and gpt-5.5.
  • oauth_port - 10531 by default; only touch it if the port is taken.
  • auto_start_oauth - on by default; flip it off if you run the proxy yourself.
  • size, quality, moderation - the same choices as the API edit node.

Outputs

  • image - the edited result, ready for Preview or Save.
  • revised_prompt - the prompt OpenAI actually generated from.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/hub2vu/Comfyui-GPT-img-node.git GPT-img

Then make sure Node.js is installed and log in once:

npx @openai/codex login

Restart ComfyUI. Manager search may not find this pack yet (registry version is still Pending), so manual clone is the way right now. No Python dependencies.

Common issues

Node.js missing is the most common wall - the node will tell you npx wasn't found. If the proxy starts but never becomes ready, check custom_nodes/GPT-img/logs/openai-oauth.log and re-run the login command. Edits can take a while on high quality, so timeout_sec (default 300, max 3600) is worth knowing about. And like every node in this pack: don't expose the OAuth port to anything but localhost.

CategoryGPT img

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGedit this image
modelCOMBOgpt-5.43 options: gpt-5.4, gpt-5.4-mini, gpt-5.5
qualityCOMBOmedium3 options: low, medium, high
sizeCOMBO1024x102413 options: 1024x1024, 1536x1024, 1024x1536, 1360x1024, 1024x1360, 1824x1024, +7
moderationCOMBOlow2 options: low, auto
oauth_portINT105311024–65535
auto_start_oauthBOOLEANtrue
timeout_secINT30030–3600

Outputs (2)

NameTypeDescription
imageIMAGE
revised_promptSTRING