Nodes/ComfyUI-nkxx/Grsai GPT Image
ComfyUI Node

Grsai GPT Image

OpenAI's image model, streaming-tolerant, up to five references

By nkxx188·Created about a year ago·Updated 14 days ago· 14
Grsai GPT Image
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
  • image_10
  • image_11
  • image_12
  • image_13
  • image_14
  • image_15
  • image_16
  • images
  • status
◄modelgpt-image-2►
◄promptA cute cat running on the grass►
◄aspectRatio1:1►
◄imageSize默认►
◄quality►
◄concurrency1►
◄api_key►

OpenAI's GPT Image line is closed-weights - the "Sora-Image" family, Google's competitor in the text-rendering-and-editing image space - and this is the Grsai-channel door to it. Prompt in, one or more images out, with up to five reference images for editing or style-locking. It's the pack's second image channel after Nano Banana, and it exists because the two models aren't interchangeable: GPT Image is the one people reach for when they need text rendered inside the image (signs, packaging, posters) or strong image-editing semantics. Nano Banana does consistency; GPT Image does "make the sign say this."

The README's phrase is "compatible with streaming-style response data," and that's a real mechanism detail: the Grsai API can respond with data: -prefixed stream fragments, and the node strips that prefix before parsing JSON. So it tolerates the shape OpenAI-style endpoints actually return, rather than assuming a clean single JSON body.

The inputs that matter

  • prompt (multiline) - the generation/editing instruction.
  • size - auto, 1:1, 3:2, 2:3 (default 1:1). Note the narrow set - no 16:9 here, unlike Nano Banana.
  • variants (1–2, default 1) - images per task. Capped at 2, so one call makes at most a couple.
  • concurrency (1–5, default 1) - parallel tasks. This is the cost multiplier.
  • api_key (optional) - Grsai key fallback.
  • image_1…image_5 (optional IMAGE) - reference images for edits and style transfers.

Outputs: images (IMAGE batch) and status (STRING with counts and the credit readout).

How it works

Readable source. Reference images upload to the Grsai channel, then concurrency tasks each POST a generation (with variants copies per task), the returned URLs are downloaded in a thread pool, and everything lands in one IMAGE batch. The status string is the honest bill: 成功: N 张 (任务 x C, 变体 x V) | 积分: X. Note it reports failures per image, so a partially failed batch won't fail silently.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx

restart (or ComfyUI Manager, "ComfyUI-nkxx"). Auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, aiohttp. No models download; Grsai key from nkxx.grsai.ai.

Common issues

  • "Image not found" in the API response: the streaming-parse path can hit an unexpected response shape - the error text will say whether results were found; retrying usually clears transient API glitches.
  • Wanted 16:9, got stuck at 3:2: the size list is intentionally short. If you need widescreen, that's what Nano Banana's 16:9/21:9 is for.
  • Cost: concurrency × variants is the multiplier per run. Draft with 1×1.
  • Filtering follows the model: OpenAI's moderation is the most aggressive of the closed image majors - text rendering requests and editorial content get refused at the source. No node setting changes that; that's the price of calling a closed model.
CategoryNkxx/Grsai/图像

Inputs (23)

NameTypeDefaultDescription
modelCOMBOgpt-image-25 options: gpt-image-2, gpt-image-2.5, gpt-image-2-vip, gpt-image-2.5-flare, gpt-image-2.5-sunburst
promptSTRINGA cute cat running on the grass—
aspectRatioCOMBO1:116 options: auto, 1:1, 3:2, 2:3, 16:9, 9:16, +10
imageSizeCOMBO默认4 options: 默认, 1K, 2K, 4K
image_1optIMAGE—
image_2optIMAGE—
image_3optIMAGE—
image_4optIMAGE—
image_5optIMAGE—
image_6optIMAGE—
image_7optIMAGE—
image_8optIMAGE—
image_9optIMAGE—
image_10optIMAGE—
image_11optIMAGE—
image_12optIMAGE—
image_13optIMAGE—
image_14optIMAGE—
image_15optIMAGE—
image_16optIMAGE—
qualityoptCOMBO5 options: , auto, low, medium, high
concurrencyoptINT11–5—
api_keyoptSTRING—

Outputs (2)

NameTypeDescription
imagesIMAGE—
statusSTRING—