Nodes/Quality of life Suit:V2/ChatGPT Simple _O
ComfyUI Node

ChatGPT Simple _O

The flagship 'make my prompt better' node

By omar92·Created 3 years ago·Updated 5 months ago· 181
ChatGPT Simple _O
    • STRING
    prompt
    model@cf/meta/llama-2-7b-chat-int8
    behaviourdescription
    seed0

    The whole pitch of the Quality of Life Suit's OpenAI section is "let a language model write your Stable Diffusion prompt." ChatGPT Simple _O is the quickest version of that: you type a subject, it returns a fully-formed prompt, ready to wire into a CLIP Text Encode. No multi-node chain, no system-message plumbing - prompt in, prompt out.

    It lives under O/OpenAI, and it's genuinely the right entry point if you want the idea without the machinery. The trade-off, and it's a real one: this node needs a working OpenAI API key, costs money per call, and the pack's relationship with the OpenAI SDK has historically been fragile. More on that below.

    How it works

    When the node runs, it builds an "init message" from your behaviour choice and sends it along with your prompt to OpenAI's chat completions API:

    • behaviour = tags - the node uses a long, detailed system prompt that teaches the model to respond with SD-style comma-separated tags, including weighted parentheses like (masterpiece, best quality:1.2) and Danbooru/gelbooru tag conventions. This is the mode you want if you're feeding a tag-based checkpoint (SD 1.5/XL-lineage models are trained on this syntax).
    • behaviour = description - a shorter system prompt asking for a natural-language image description. Better when you're prompting a model that reads prose.

    You pick model (dropdown: gpt-3.5-turbo, or @cf/meta/llama-2-7b-chat-int8), and there's a seed input - but be aware the seed is not actually used. The code accepts it and never sends it to the API; OpenAI's chat API has no reproducible-seed parameter. Same seed will not reliably give the same output. It's decorative.

    Setup: the part that burns people

    The API key comes from config.json, which the pack auto-creates in its own folder on first run:

    {
      "autoUpdate": true,
      "branch": "dev",
      "openAI_API_Key": "sk-your-key-here"
    }
    

    Drop your real key into openAI_API_Key and restart. Then the critical choice: start with gpt-3.5-turbo. The other default, @cf/meta/llama-2-7b-chat-int8, is a Cloudflare Workers model ID that only works through a proxy base_url - this node calls the plain OpenAI endpoint, so that option will error for you out of the box.

    Installing

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

    or ComfyUI Manager → search ComfyUI-QualityOfLifeSuit_Omar92, then restart. The openai Python package gets installed on demand at runtime.

    The known-fragile part

    Two real-world failure modes, both documented by users: first, the pack will print Error: OpenAI API key is invalid at startup even when your key is fine - this is usually a latency failure in the model-list check, not a bad key. Second, the OpenAI Python SDK has moved versions several times, and this pack has historically lagged; community fixes involved pinning openai==0.28 or migrating to the newer OpenAI client interface. If you hit an error mentioning openai.Model or ChatCompletion, that's the SDK version mismatch talking. My advice: try the simple node once with gpt-3.5-turbo; if it works, great - it's a fun toy and a decent prompt starter. If the SDK fights you, the value-per-hour is better spent in the pack's string nodes and a little manual prompt engineering.

    CategoryO/OpenAI

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRING
    modelCOMBO@cf/meta/llama-2-7b-chat-int82 options: @cf/meta/llama-2-7b-chat-int8, gpt-3.5-turbo
    behaviourCOMBOdescription2 options: tags, description
    seedoptINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    STRINGSTRING