ComfyUI Node

Magic Prompt

Magic Prompt (DPMagicPrompt)

By adieyal·Created 3 years ago·Updated 2 years ago· 430
Magic Prompt
    • STRING
    text
    seed0
    autorefreshNo

    Magic Prompt takes your short, boring prompt and pads it out with "relevant modifiers" - the kind of trailing keyword salad you'd normally copy off someone else's Civitai post. Type "a cat", and it might hand back "a cat, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration." It does this with an actual neural network, not a lookup table, so the additions are learned from a big pile of real Stable Diffusion prompts rather than pulled from a fixed list.

    Under the hood it's a small GPT-2-style language model fine-tuned on SD prompts (the Gustavosta MagicPrompt lineage). The first time you run the node it downloads that model, so expect a one-time wait and a few hundred MB on disk. After that it runs locally - no API, no key.

    Is it worth using in 2026? Honestly, be picky

    This node is a product of the SD 1.5 / early-SDXL era, and so is the vocabulary it spits out. "masterpiece, trending on artstation, 8k, highly detailed" is exactly the quality-tag boilerplate that still helps on SDXL-lineage models (Illustrious, Pony, NoobAI) and does nothing on the LLM-encoded models that took over in 2026 - Z-Image, Flux 2, Anima and friends read your prompt as an instruction, and that keyword soup just eats attention. So Magic Prompt is genuinely useful if you're running an SDXL-family checkpoint and want ideas for filler, and mostly counterproductive if you're on a modern LLM-encoded base. Know which one you're feeding.

    Even on SDXL, treat the output as a starting point you edit, not gospel. The community's been mixed on automated prompt-magic since the beginning - the recurring complaint is "how do I even tell if it's doing anything?" The answer: pipe it into an OutputString node and read what it added.

    Inputs and outputs

    • text - your seed prompt, the short thing you want expanded. Multiline.
    • seed - controls the generation, same-seed-same-output.
    • autorefresh - Yes/No. With No, the model runs once and reuses that expanded prompt for later runs; with Yes, it re-expands every iteration. Set it to Yes if you actually want variety between generations.

    Output is a STRING - the expanded prompt - that goes into a CLIP Text Encode node like any other prompt.

    Installing it

    ComfyUI Manager → search dynamicprompts → install → restart is the simple route. Manual:

    git clone https://github.com/adieyal/comfyui-dynamicprompts custom_nodes/comfyui-dynamicprompts
    python -m pip install -r custom_nodes/comfyui-dynamicprompts/requirements.txt
    python custom_nodes/comfyui-dynamicprompts/install.py
    mkdir custom_nodes/comfyui-dynamicprompts/wildcards
    

    The requirements.txt step matters more for this node than the others - it pulls in the transformers stack the model runs on. Restart when it's done.

    Where people get burned

    The first run stalls while it downloads the model. That's not a hang, it's HuggingFace pulling a few hundred MB. Give it a minute and watch the console. If your machine has no internet at generation time, the download can't happen and the node won't work - this is a "download once, then offline is fine" deal, not a "fully offline forever" one.

    You can't pick the model. The author flagged this as a known limitation from day one - Magic Prompt uses its bundled model and doesn't (yet) expose a picker for swapping in a different fine-tune. If you want a specific prompt-writing model, this isn't the node for that.

    Output quality is era-locked. As above: if the modifiers look dated, it's because they are. On a 2026 LLM-encoded checkpoint you're better off asking an actual LLM to write a structured prompt than bolting SD 1.5 keyword filler onto it. Reach for Magic Prompt when you're on an SDXL-family model and want a quick, local idea generator - that's its lane, and it's fine at it.

    CategoryDynamic Prompts

    Inputs (3)

    NameTypeDefaultDescription
    textSTRING
    seedINT0
    autorefreshCOMBONo2 options: Yes, No

    Outputs (1)

    NameTypeDescription
    STRINGSTRING