Nodes/RunNode Prompter/RunNode Prompt Translator
ComfyUI Node

RunNode Prompt Translator

Comma-separated prompt format, in the language you need

By SF-Runnode·Created 8 months ago·Updated 4 months ago· 0
RunNode Prompt Translator
    • translation
    prompt
    advanced_optionsauto
    seed100
    apiBaseUrl
    apiKey
    model

    The middle child of the pack, and the one you actually want most of the time. The plain translator in this family just moves text between Chinese and English while keeping the original meaning. This node does that and reshapes the result into the comma-separated, phrase-style format that image models like. Think of it as translation plus a prompt-engineering pass in one call: "concise, vivid, comma-separated phrases" that "include subject, attributes, composition, style, lighting," with the model told to return only the final prompt and no chat preamble. If you write your ideas in Chinese and want a ready-to-paste English prompt out of ComfyUI, this is the node.

    It's an LLM API call, same as everything in this pack - nothing runs locally, no model downloads. The flow: clean the input text, detect which way to translate, split anything longer than 400 characters into chunks, and send each chunk to an OpenAI-compatible chat endpoint with a "senior prompt engineer" system prompt. The chunks get re-joined into a single string on the way out. Direction detection is a simple regex - if the text contains CJK characters it translates Chinese-to-English, otherwise English-to-Chinese - and advanced_options lets you override that guess with force_English or force_Chinese.

    The inputs worth caring about:

    • prompt - required, your rough text.
    • advanced_options - auto (default), force_English, or force_Chinese.
    • apiBaseUrl, apiKey, model - the LLM endpoint, key, and model. seed is decoration; the code never forwards it.

    Output is one translation STRING, which wires straight into a CLIP Text Encode, a text display, or any node with a text socket. In KB terms this is the "LLM as a graph tool" pattern - text in, structured text out, upstream of the sampler.

    The gotchas are the pack's, shared with its siblings. There's no requirements.txt, and the pack imports the openai SDK at load, so if you hit a module error after install, pip install openai in your ComfyUI environment. If you leave the API fields blank or as default, the node falls back to your environment variables, then the pack's config file, then - if nothing at all is set - OpenAI's own endpoint with gpt-4o-mini and an empty key, which is a confusing auth error in waiting. And because the default config lives behind an internal org endpoint, you'll almost certainly want to supply your own apiBaseUrl and apiKey. Install is the usual: ComfyUI Manager → search "RunNode Prompter", or git clone https://github.com/SF-Runnode/ComfyUI_rn_prompter into custom_nodes, then restart.

    Worth knowing: the node re-runs on every queue (it returns the current time from IS_CHANGED), so each run is a paid API call, and the pack is small and obscure enough - zero comfy.icu impressions, no community threads - that you should read what a fresh custom node does before wiring your key in. An API-wrapper node that holds a credential and makes network calls by design is exactly the shape to double-check first.

    CategoryRunNode/rn_prompter

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRING
    advanced_optionsCOMBOauto3 options: auto, force_English, force_Chinese
    seedoptINT1000–18446744073709550000
    apiBaseUrloptSTRING
    apiKeyoptSTRING
    modeloptSTRING

    Outputs (1)

    NameTypeDescription
    translationSTRING