ComfyUI Node

create image _O

Why this node ignores its own 'number' input (and 3 other quirks)

By omar92·Created 3 years ago·Updated 5 months ago· 181
create image _O
  • client
  • IMAGE
  • MASK
prompt
number1
size256x256
seed0

create image _O is the pack's bridge from text to pixels without touching a local model: it calls OpenAI's image API (DALL-E 2) and drops the result into ComfyUI as a standard IMAGE. You type a description, get a tensor you can VAE-encode, inpaint around, or just save. In a local-first ecosystem where half the fun is never paying per image, it's an oddity - but if you want a quick reference image mid-workflow and don't care about API costs, it works.

It sits under O/OpenAI/Advanced/Image and is the current, non-deprecated version of the DALL-E node. It expects a client from load_openAI _O - that's the piece that actually holds your API key and endpoint.

What you set

  • client (CLIENT) - from load_openAI _O, the API connection
  • prompt (STRING) - the image description
  • number (INT, 1–10) - how many images to generate… in theory
  • size - 256x256, 512x512, or 1024x1024
  • seed (optional INT) - present, but see below

The outputs are IMAGE and MASK. The mask is the alpha channel of the returned PNG when one exists (inverted), or a blank 64×64 tensor when there's no transparency. Most DALL-E outputs are opaque, so don't expect a useful mask most of the time.

The quirks, and they're in the source

Read the code and a few things jump out:

  1. number is hardcoded to 1. The input is right there in the schema, min 1, max 10, and then the function does number = 1 and never uses it. You can set it to 10 and you'll still get one image. This is the kind of thing that's been silently lying to users for years.
  2. seed does nothing. It's accepted as a parameter and never passed to the API. DALL-E 2 has no seed parameter on that endpoint anyway, so it's decorative.
  3. Failures return a placeholder, not an error. If the API call throws, the node prints the exception to the console and downloads https://i.imgur.com/removed.png - a "removed" placeholder image. Your workflow keeps running and produces garbage that looks intentional. If your output is suddenly a missing-image icon, check the console.
  4. The default endpoint is a proxy. load_openAI _O defaults base_url to a Cloudflare-worker proxy rather than OpenAI's own endpoint. If you're plugging in a real key, set base_url to https://api.openai.com/v1 and pass the key there or in the pack's config.json.

There's also a bigger compatibility question hanging over this whole OpenAI wing: the pack's own metadata admits it "does not support the new OpenAI API." The current SDK returns response objects, while this node's success path reads imagesURLS["data"][0]["url"] like a dict - which is exactly the kind of mismatch that lands you in the placeholder-image fallback. It might work with a pinned older openai version; with a fresh install, temper your expectations.

Install

Ships with the Quality of Life Suit (O/ menu), one install covers everything:

cd <ComfyUI root>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git

Restart ComfyUI (browser reload won't load new nodes). The pack auto-updates on startup via a generated config.json - set "autoUpdate": false there if you want stability. Honest verdict: for a one-off reference image it's fine, but for anything serious you're probably better off with a local SD/SDXL graph - free, private, and no weird placeholder fallback waiting to catch you.

CategoryO/OpenAI/Advanced/Image

Inputs (5)

NameTypeDefaultDescription
clientCLIENT
promptSTRING
numberINT11–10
sizeCOMBO256x2563 options: 256x256, 512x512, 1024x1024
seedoptINT00–18446744073709550000

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK