Nodes/comfyui-mixlab-nodes/Prompt Generate ♾️Mixlab
ComfyUI Node Runs on cloud

Prompt Generate ♾️Mixlab

Prompt Generate — Write in Chinese, Get an Expanded English Prompt

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
Prompt Generate ♾️Mixlab
    • prompt
    text
    multiple
    seed100

    This node has a specific origin story that explains its odd combination of features, and it's worth knowing before you use it: it's the pack's ChinesePrompt/PromptGenerate feature, built so a Chinese-speaking user could type a short idea in Chinese and get back a properly expanded, English-style Stable Diffusion prompt without leaving ComfyUI to run it through a translator first. If you're not writing in Chinese, it still works as a plain prompt expander - just know that's the use case it was actually designed around.

    Under the hood it chains two separate models. First, if your input isn't already English, a translation model (Helsinki-NLP/opus-mt-zh-en) converts it. Then a prompt-expansion model (succinctly/text2image-prompt-generator) takes that text and generates a fuller, more detailed prompt from it - the same kind of "expand a short idea into descriptive tags and phrases" behavior that stand-alone prompt-generator tools do, just wired directly into your graph.

    The inputs are minimal: text, a multiline STRING where you type your starting idea, in Chinese or English. The optional multiple toggle (off/on) controls whether you get one generated prompt back or several variants from the same input - matching the output, which is a STRING list rather than a single string, so downstream you'll typically want to either pick one manually or feed the list through something like JoinWithDelimiter if you want them all in one place. seed (default and minimum 100) gives you some control over which variant comes out when generating multiple.

    Here's the thing to know before you even try this node: the two models it depends on are not bundled with the pack, and this is a genuinely common failure point - real enough that it's shown up as a support question from actual users hitting it. Without both models downloaded, ComfyUI will throw errors on startup naming exactly what's missing: text_generator_model not found, pointing at models/prompt_generator/text2image-prompt-generator, and zh_en_model not found, pointing at models/prompt_generator/opus-mt-zh-en. Both come straight from Hugging Face - succinctly/text2image-prompt-generator and Helsinki-NLP/opus-mt-zh-en respectively - and both need to be placed in exactly those folder paths under your ComfyUI models directory before this node will load, let alone run.

    Installing the pack itself is the standard route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git
    cd comfyui-mixlab-nodes
    install.bat
    

    or through ComfyUI Manager (search "comfyui-mixlab-nodes"), or pip3 install -r requirements.txt in a venv. That gets you the node in your menu - it does not get you the two model folders it needs, and that gap is exactly where people get stuck. If you see either "not found" error on ComfyUI startup, don't assume the install failed; it almost certainly succeeded, and you just need to go download those two specific Hugging Face repos into the two specific folders the error message already told you about.

    Category♾️Mixlab/Prompt

    Inputs (3)

    NameTypeDefaultDescription
    textSTRING
    multipleoptCOMBO2 options: off, on
    seedoptINT100100–18446744073709550000

    Outputs (1)

    NameTypeDescription
    promptSTRING