Nodes/babydjac Nodes/Qwen Image Prompter
ComfyUI Node

Qwen Image Prompter

Grok Writing Qwen-Style Prompts (Yes, Really)

By babydjac·Created 7 months ago·Updated 5 months ago· 12
Qwen Image Prompter
    • qwen_prompt
    idea
    api_key

    Here's a name that lies in a fun way. The Qwen Image Prompter is supposed to write prompts in the style that Qwen-Image models like - short, plain English, subject first, environment second, no parameters - and it does. But the model doing the writing isn't Qwen. It's Grok (specifically grok-3-latest on the xAI API). "Qwen" refers to the target's prompt conventions, not the engine. The pack author leans on Grok for everything, and this node is his Qwen-Image prompt writer.

    If you generate on Qwen-Image or Z-Image (which also reads instruction-style prompts well), this is a handy way to get format-correct prompts from a rough idea. From the babydjacNODES pack, it's one of the simplest nodes here.

    How it works

    You give it an idea and an xAI API key. It sends a fixed system prompt - the Qwen prompt guide - to the API. The guide is specific and worth reading, because it is the model's prompting philosophy:

    1. Keep it 1–3 sentences of plain English.
    2. Order: main subject first, then visual style/medium, then environment & background, with mood/lighting/composition optionally last.
    3. If text needs to appear in the image, put the exact words in double quotes.
    4. No parameters (steps, guidance, seed) in the text.
    5. No labels, no Markdown - prompt only.

    The returned text is cleaned (leading **bold** labels and stray quotes stripped) and output as a single string. Temperature is fixed at 0.3, so output is reasonably stable but not robotic.

    The inputs that matter

    • idea - required, your rough description. The more it resembles "what's in the picture," the less Grok has to invent.
    • api_key - required, and there's no env-var fallback here; an empty key returns the string "Error: API key required." rather than raising.

    Output is a single STRING, qwen_prompt, and the node is marked as an output node - it's the end of a prompt line, feeding your Qwen/Z-Image text encoder.

    Install

    ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes, restart, hard-refresh. No extra pip deps.

    Troubleshooting

    • "API key required." - fill the widget; unlike some pack siblings, env vars won't help here.
    • "API call timed out." - the timeout is 30s; xAI can be slow under load. Re-queue.
    • Text-in-image misfires - Grok reliably follows the "put exact words in quotes" rule, but it can add quotes Grok thinks you want. If you didn't ask for text, and the prompt contains a quoted phrase, that's Grok improvising.

    The honest take

    The 1–3 sentence format really is what Qwen-Image and Z-Image want - this matches the community's "plain English, no boilerplate" consensus for instruction-following image models. If you already know how to write that style of prompt by hand, the node saves you maybe thirty seconds. Where it earns its keep is iteration: rephrasing the idea and getting a clean, correctly-formatted prompt back without thinking about the format. Just remember - it's Grok under the hood, so it costs money per call, and "Qwen" is a style guide, not the model.

    CategorybabydjacNODES/Prompting

    Inputs (2)

    NameTypeDefaultDescription
    ideaSTRING
    api_keySTRING

    Outputs (1)

    NameTypeDescription
    qwen_promptSTRING