Nodes/Comfyui_Comfly/Comfly_gpt_image
ComfyUI Node

Comfly_gpt_image

Transparent PNGs and Loose Moderation, via API

By ainewsto·Created 2 years ago·Updated 3 days ago· 362
Comfly_gpt_image
    • generated_image
    • response
    prompt
    api_key
    modelgpt-image-1
    n1
    qualityauto
    sizeauto
    backgroundauto
    output_formatpng
    moderationauto
    seed0

    OpenAI's GPT Image models are the closed generators that do two things local models still struggle with: text rendering that doesn't look like a ransom note, and actual transparent-background output. This node puts GPT Image 1 (and its 1.5 refresh) inside ComfyUI through the Comfly proxy, so you get those capabilities without leaving your graph or opening your own OpenAI account.

    It's a text-to-image node, plain and simple - prompt in, image out - aimed at the "I need a clean render with readable text" use case. The kind of thing you'd otherwise screenshot from ChatGPT and drag in. Here it's just another node in the pipeline.

    How it works

    Your prompt is sent to the proxy's OpenAI-compatible endpoint, which calls GPT Image, and the result comes back as an IMAGE tensor plus a raw response string. All inference happens on OpenAI's side; your GPU never wakes up. Per-call pricing, so the bill scales with how much you generate.

    The inputs that matter

    • prompt - the whole game. GPT Image is a strong prompt-follower; be concrete about text you want in the image (quote it), since accurate text rendering is its party trick.
    • model - gpt-image-1 (default) or gpt-image-1.5. The 1.5 is the newer refresh; 1 is the battle-tested default.
    • quality - auto / high / medium / low, default auto. high costs more and takes longer; try auto first.
    • size - auto, 1024x1024, 1536x1024, 1024x1536. Default auto lets the model pick.
    • background - here's the differentiator: auto, transparent, or opaque. Set transparent and you get a real alpha PNG - gold for logos, icons, and assets you'll composite later. This is the input that makes the node worth installing on its own.
    • output_format - png / jpeg / webp. PNG if you used transparent.
    • moderation - auto or low. low relaxes OpenAI's safety filtering. Use it knowing what you're asking for; the API's terms still apply.
    • n - 1–10 images per call. Each is billed, so "just to be safe" gets expensive fast.
    • seed - set it if you want to lock a take.

    Outputs are generated_image (IMAGE) and response (STRING, the raw API reply).

    Install

    Manager → search Comfyui_Comfly, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ainewsto/Comfyui_Comfly
    

    Restart. The requirements.txt is the usual aiohttp/requests/Pillow/numpy plus the torch/transformers already in your environment - no model files to download. Key from ai.comfly.chat goes in Comflyapi.json or the node's api_key field.

    Where people get burned

    Two classic traps. First: this is a resold OpenAI call, and background: transparent + output_format: png must both be set or you'll chase a phantom alpha that isn't there - the model can't give you transparency if you've asked for JPEG. Second: the per-call cost stacks with n and quality: high; a "quick test" of 4 high-quality images is four billed calls before you've learned anything. And moderation: low is a real loosening, not a free pass - keep the usual cloud-safety judgment about what you send through a third-party proxy.

    CategoryComfly/Openai

    Inputs (10)

    NameTypeDefaultDescription
    promptSTRING
    api_keyoptSTRING
    modeloptCOMBOgpt-image-12 options: gpt-image-1, gpt-image-1.5
    noptINT11–10
    qualityoptCOMBOauto4 options: auto, high, medium, low
    sizeoptCOMBOauto4 options: auto, 1024x1024, 1536x1024, 1024x1536
    backgroundoptCOMBOauto3 options: auto, transparent, opaque
    output_formatoptCOMBOpng3 options: png, jpeg, webp
    moderationoptCOMBOauto2 options: auto, low
    seedoptINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    generated_imageIMAGE
    responseSTRING