variation_image _O
DALL-E 2 Variations, Still Alive in ComfyUI — Barely
- client
- image
- IMAGE
- MASK
variation_image _O sends an image to OpenAI's DALL-E 2 and returns a "variation" - the same scene remixed in the model's style. It's one of the few nodes in omar92's Quality of Life Suit that actually calls out to the internet, and it's the fiddliest one in the pack to get running. If you just want to riff on an image, a local img2img pass at low denoise or an IP-Adapter workflow gets you the same idea for free and without an API key. This node exists for people who specifically want DALL-E 2's take, or who want the OpenAI suite wired into a graph.
How it works
This is the Advanced OpenAI route, so it needs a client from load_openAI _O (under O/OpenAI/Advanced). That node builds an OpenAI() client using the openai Python package, which the pack pip-installs on the fly the first time you use it - there's no requirements.txt declaring it.
From there the mechanism is straightforward: the node converts your IMAGE tensor to a PNG in memory, calls client.images.create_variation() with the raw bytes, gets a URL back, downloads that image, and converts it back into a tensor plus a MASK. The MASK is derived from the image's alpha channel (inverted). DALL-E returns JPEGs with no alpha, so in practice you get a blank all-zeros mask - wire the IMAGE output and ignore the MASK; it's dead weight here.
The inputs that matter
client(CLIENT) - fromload_openAI _O. This is the gateway to everything.image(IMAGE) - whatever you want varied.number(INT, 1–10) - here's the catch: the code hardcodesnumber = 1in the function body, so you always get exactly one variation no matter what you set. The widget is a ghost.size- dropdown,256x256,512x512, or1024x1024(default256x256). DALL-E 2's ceiling is 1024px.seed(optional INT) - accepted but never sent to the API.create_variationhas no seed parameter, so this is cosmetic.
Both outputs - IMAGE and MASK - come from this terminal node, so it finishes the branch of your graph.
Where people get burned
Three traps, in order of how often they bite.
The API key goes in the node, not config.json. load_openAI _O reads the key from its api_key field, which defaults to empty. The openAI_API_Key you paste into the pack's config.json is only read by the "Simple" ChatGPT nodes. Real users have hit "Error: OpenAI API key is invalid OpenAI features wont work for you" after pasting a perfectly good key into config.json - and the community diagnosis is that the check is flaky and can fire on a slow response. For this node, type the key directly into load_openAI _O.
The default base_url is a third-party proxy. Despite the README claiming it "defaults to OpenAI", the code defaults base_url to https://openai-cf.realnow.workers.dev/v1 - a Cloudflare Worker proxy, not OpenAI. That's a weird thing to ship as a default, and you should set it to https://api.openai.com/v1 with your own key, or point it at a compatible gateway you control.
The pack is legacy against the modern openai SDK. The project's own metadata says it "does not support the new OpenAI API, leading to compatibility issues", and the code reads the response the old dict-style way (imagesURLS["data"][0]["url"]). The current openai package returns typed objects, not dicts, so expect this to error or silently fall back to a placeholder image on newer versions. Since the pack installs whatever openai is latest at runtime, it drifts with every pip update.
Installing it
The whole suite in one shot:
cd ComfyUI/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI - reloading the browser tab isn't enough. Or search "Quality of Life Suit" in ComfyUI Manager. First startup creates config.json; the pack self-updates from GitHub unless you set "autoUpdate": false. The OpenAI nodes pull in the openai package on demand.
Honest bottom line: if you have a specific reason to use DALL-E 2 variations - legacy workflow, or you're demonstrating the OpenAI integration - this works when you fight through the base_url and key setup. If you just want image variations, your local stack will do it better and cheaper. Treat this one as a curiosity with a learning curve, not a daily driver.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| client | CLIENT | — | |
| image | IMAGE | — | |
| number | INT | 11–10 | — |
| size | COMBO | 256x256 | 3 options: 256x256, 512x512, 1024x1024 |
| seedopt | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |