Nodes/ComfyUI Prompt Helper/Prompt LLM Helper
ComfyUI Node

Prompt LLM Helper

Type it in Chinese, get back an English prompt that's actually good

By Simlym·Created about a year ago·Updated about a year ago· 5
Prompt LLM Helper
    • positive(en)
    • negative(en)
    • positive(zhs)
    • negative(zhs)
    chinese_prompt请输入中文提示词
    sd_model_type
    model
    system_prompt你是一个ComfyUI专家,擅长将中文提示词转换为适合不同模型的英文提示词。请根据用户指定的模型类型,生成最适合的英文提示词,并确保中文翻译准确对应英文内容。同时,请生成相应的负向提示词。
    api_key
    use_contextfalse

    If you've ever sat in ComfyUI with a good idea in Chinese and an SDXL checkpoint that only understands comma tags, you know the friction this node exists to remove. Prompt LLM Helper is a single node from the tiny comfyui-prompt-helper pack: give it a Chinese prompt, it calls an LLM API, and hands you back four ready-to-wire strings - a positive English prompt, a negative one, and Chinese translations of both, shaped for whichever model family you're about to condition (SD1.5, SDXL, or FLUX).

    It's a translator with taste. And the "Helper" in the name isn't you - it's the LLM doing the prompting for you.

    How it works

    Under the hood it's a plain chat-completions call, not local inference. The node wraps your Chinese text in a fixed instruction asking the model to do four jobs at once - write the English positive, translate it back to Chinese, write a negative, translate that too - then sends it to DeepSeek or OpenAI via the openai SDK at temperature 0.7 with a 2,000-token budget. The reply comes back as a marked-up block and the node parses it by splitting on Chinese section headers like [正向英文提示词].

    That means every run is a network round-trip. It costs fractions of a cent, it needs internet, and it's only as fast as your API is. No models to download, no weights, nothing local.

    One detail that bites people: the model dropdown isn't hard-coded. It's generated from config.json inside the pack folder when ComfyUI starts. If you edit that file to add a provider or model, you have to restart ComfyUI before it appears in the list.

    The inputs that matter

    Six required inputs, but you'll actually touch three of them:

    • chinese_prompt - your text. Multiline, so write a paragraph, not a single word.
    • sd_model_type - SD1.5, SDXL, or FLUX. This only changes the wording of the instruction sent to the LLM; it doesn't load a model. Pick the family of the checkpoint you're about to condition.
    • model - which API model to call. Defaults are DeepSeek (deepseek-chat, deepseek-reasoner) and OpenAI (gpt-4, gpt-3.5-turbo).

    The rest you can mostly leave alone. system_prompt ships with a sensible Chinese default - touch it only if the output quality frustrates you. api_key lets you paste a key in the UI instead of editing files; it overrides config.json, and if auto_save_api_key is on in config, the node will write that key to the file in plaintext. Know that before you share the folder. use_context keeps the previous exchange so follow-up edits run on the same thread.

    Wiring the outputs

    Four STRING outputs. positive(en) goes into a CLIP Text Encode → Positive Conditioning, negative(en) into the Negative. The positive(zhs) and negative(zhs) outputs are translations for your own sanity - drop them into a Preview Text node to confirm the English actually says what you typed.

    One honest caveat from the prompt-engineering trenches: an LLM-written negative won't save you on a distilled model. On Flux Schnell, Turbo checkpoints and the like, the negative prompt is inert at their designed CFG 1 - ComfyUI doesn't even compute it. And on SDXL-lineage models, a forty-keyword negative the LLM generated can actively fight your positive prompt. Treat the English as a strong draft you still get to edit, not a finished artifact.

    Installing

    Standard custom-node affair - ComfyUI Manager, search "ComfyUI Prompt Helper", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Simlym/comfyui-prompt-helper.git
    cd comfyui-prompt-helper
    pip install -r requirements.txt
    

    The dependencies are just requests and openai (httpx rides along as an openai dependency). Restart ComfyUI and you'll find Prompt LLM Helper under the "conditioning" category.

    Gotchas

    The node swallows failures. If the API call errors, or the model drifts from the expected section format, you get empty strings back and the error only lands in ComfyUI's console. Empty positive means blank conditioning, which usually means a black or mangled image. If you're getting nothing out, check the key first - the shipped config.json defaults to the literal placeholder your_api_key_here, which fails every single call until you replace it or paste a real key into the node.

    And remember what you're doing here: a small, virtually-unknown pack is sending your text - and whatever key you hand it - to a third-party API. Fine for personal use. Just be deliberate about the key, and don't expose your ComfyUI instance to the open internet, a lesson this ecosystem keeps learning the hard way.

    Categoryconditioning

    Inputs (6)

    NameTypeDefaultDescription
    chinese_promptSTRING请输入中文提示词
    sd_model_typeCOMBO3 options: SD1.5, SDXL, FLUX
    modelCOMBO4 options: DeepSeek_deepseek-chat, DeepSeek_deepseek-reasoner, OpenAI_gpt-4, OpenAI_gpt-3.5-turbo
    system_promptSTRING你是一个ComfyUI专家,擅长将中文提示词转换为适合不同模型的英文提示词。请根据用户指定的模型类型,生成最适合的英文提示词,并确保中文翻译准确对应英文内容。同时,请生成相应的负向提示词。
    api_keySTRING
    use_contextBOOLEANfalse

    Outputs (4)

    NameTypeDescription
    positive(en)STRING
    negative(en)STRING
    positive(zhs)STRING
    negative(zhs)STRING