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

ChatGPT compact _O

ChatGPT with your own system message

By omar92·Created 3 years ago·Updated 5 months ago· 181
ChatGPT compact _O
    • STRING
    prompt
    initMsg act as prompt generator ,i will give you text and you describe an image that match that text in details use gelbooru tags in your description also describe the high quality of the image, answer with one response only
    modelgpt-3.5-turbo
    seed0

    ChatGPT Simple _O gives you a prompt-generator with a fixed personality - tags or description, take it or leave it. ChatGPT compact _O is the "mid" option: same one-call-to-OpenAI idea, but with an initMsg field you can edit, which becomes the system message that shapes what the model returns.

    It sits in O/OpenAI in the Quality of Life Suit, and it's the node to use when the Simple node's baked-in behavior doesn't fit - you want the model to write in a specific style, stick to a character limit, output JSON, or act as a specific kind of editor. That flexibility is the entire reason it exists.

    How it works

    The node sends your prompt plus initMsg to OpenAI's chat completions and returns the reply as a single STRING. The defaults tell you exactly how the author thinks about it: initMsg ships prefilled with a "act as prompt generator, use gelbooru tags, describe the high quality of the image, answer with one response only" system message - the same persona the Simple node uses for its description mode.

    Inputs that matter:

    • prompt - your subject or request (multiline).
    • initMsg - the system message. Edit this to change the model's behavior entirely. This is the field that makes the node more than a clone of the Simple version.
    • model - dropdown: gpt-3.5-turbo (works out of the box) or @cf/meta/llama-2-7b-chat-int8 (a Cloudflare Workers model ID that only functions through a proxy base_url - pick gpt-3.5-turbo unless you've configured one).
    • seed - accepted but not actually used; the code never passes it to the API. OpenAI's chat API has no seed parameter, so don't expect reproducible outputs.

    Setup

    Same as every OpenAI node in this pack: your API key lives in config.json in the pack folder (auto-created on first run), and the openai Python package is installed on demand at runtime. Put a real key in, restart, pick gpt-3.5-turbo.

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

    or ComfyUI Manager → search ComfyUI-QualityOfLifeSuit_Omar92, then restart ComfyUI.

    The known-fragile part

    The pack prints Error: OpenAI API key is invalid at startup even with a working key - that message is usually a slow model-list check timing out, not an actual key problem; the node itself may still work. And this pack's OpenAI integration has a long history of breaking when the OpenAI Python SDK bumps versions (community threads reported failures after openai>=1.0.0, with the workaround of pinning openai==0.28 or migrating the client). If you see errors about openai.Model or ChatCompletion, that's the SDK mismatch. Worth knowing before you build your whole workflow around it: it works when it works, and when it breaks it's an SDK archaeology project.

    CategoryO/OpenAI

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRING
    initMsgSTRING act as prompt generator ,i will give you text and you describe an image that match that text in details use gelbooru tags in your description also describe the high quality of the image, answer with one response only
    modelCOMBOgpt-3.5-turbo2 options: @cf/meta/llama-2-7b-chat-int8, gpt-3.5-turbo
    seedoptINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    STRINGSTRING