ComfyUI Node

Generate Prompt

One seed, one random prompt from 112 categories

By clouddreamfly·Created about a year ago·Updated 8 months ago· 4
Generate Prompt
    • text
    languageChinese
    classify--
    seed0
    preset_prefix
    preset_suffix
    input_prompt

    Some prompts you want to write; others you want to be surprised by. Generate Prompt is the surprise machine: pick one of 112 categories - action, age, animal, background, pose, scenery, and so on - and it draws a single random phrase from that category's dataset, seeded, wrapped with whatever prefix and suffix you supply. It's the "give me a starting point" node of ComfyUI-PromptWrapper, and it's great for inspiration dumps and seed exploration.

    How it works

    Every category maps to a JSONL file in the pack's assets/ folder (e.g. category actionaction_datas.jsonl). The node picks entry seed % dataset_length from that file and returns its text. The preset_prefix and preset_suffix inputs sandwich the draw - so you can generate a lone tree, <random scenery>, golden hour by putting the fixed bits on either side. The optional input_prompt gets prepended ahead of everything. -- on the category means "no draw", leaving you with just the prefix/suffix/input text.

    Inputs that matter

    • classify - the category dropdown, 112 options. This is the only pick you actually make.
    • seed - drives the draw; bump it to roll again.
    • preset_prefix / preset_suffix - your fixed framing around the random phrase.
    • language - Chinese or English dataset.
    • input_prompt (optional) - prepended fixed text.

    One text output: input_prompt, prefix + <random phrase> + suffix.

    Install

    ComfyUI Manager → Custom Nodes Manager → search ComfyUI-PromptWrapper → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/clouddreamfly/ComfyUI-PromptWrapper
    

    No models - the 112 category datasets ship with the pack.

    Where people get burned

    It's a single draw, not a sentence: a random action phrase ("Turn around") isn't a complete prompt, it's a clause - you're expected to wrap it in a subject via prefix/suffix or chain it into a Combine Prompt. Don't expect full scenes from one node. Also, because the pick is seed % length, different categories have different dataset sizes, so the same seed doesn't mean the same "feel" across categories - each draw is deterministic but not comparable. And as always with this pack, language defaults to Chinese; on a Western model you'll want English, since the bundled English datasets are properly translated, not transliterated.

    CategoryPromptWrapper

    Inputs (6)

    NameTypeDefaultDescription
    languageCOMBOChinese2 options: Chinese, English
    classifyCOMBO--113 options: --, action, age, animal, animal ears, animal horn, +107
    seedINT00–18446744073709550000
    preset_prefixSTRING
    preset_suffixSTRING
    input_promptoptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING