Nodes/Comfy_olima/๐ŸŒ Ollama Cloud Translator
ComfyUI Node

๐ŸŒ Ollama Cloud Translator

Translate Your Prompt to English and Skip Hand-Writing SD Tags

By utahime12ยทCreated 4 months agoยทUpdated 4 months agoยท 0
๐ŸŒ Ollama Cloud Translator
    • translated_text
    • original_text
    โ—„text์—ฌ๊ธฐ์— ๋ฒˆ์—ญํ•  ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.โ–บ
    โ—„modeldeepseek-v4-flash:cloudโ–บ
    โ—„target_languageEnglishโ–บ
    โ—„translation_stylesd_promptโ–บ
    โ—„api_keyโ–บ
    โ—„custom_modelโ–บ
    โ—„base_urlhttps://ollama.com/v1โ–บ
    โ—„temperature0.30โ–บ
    โ—„max_tokens512โ–บ
    โ—„max_retries2โ–บ
    โ—„seed0โ–บ

    The main event in the Comfy_olima pack: a node that takes Korean (or Japanese, Chinese, English) text and turns it into a prompt-ready English string, using an LLM through Ollama's OpenAI-compatible API. Its author is Korean and the README is Korean-first, which tells you exactly who this was built for - people who think about the image in their native language and can't be bothered to hand-write comma-separated English tags. Default style is sd_prompt, and that's the whole pitch: not a plain translator, a prompt engineer.

    This is the "LLM-in-the-graph" pattern from the ComfyUI ecosystem, pointed at text instead of the sampler. You type "๊ฒจ์šธ ์ˆฒ์†์˜ ์—ฌ์„ฑ, ์€์€ํ•œ ํ–‡์‚ด" and get back something like a woman in a winter forest, soft sunlight, cinematic lighting, detailed, masterpiece. Wire that into a CLIP Text Encode node and it behaves exactly like a prompt you wrote by hand - because it is one.

    How it works

    It's a thin HTTP client, not a model loader. It POSTs to {base_url}/chat/completions with a system prompt built from your style choice plus your text as the user message. The endpoint defaults to https://ollama.com/v1 (Ollama Cloud, needs an API key from ollama.com/settings/keys), or point it at http://localhost:11434/v1 for your own Ollama server, where no key is needed. The code even auto-fixes sloppy URLs - strips a trailing /chat/completions you pasted in, appends /v1 if missing - which is a small kindness you'll appreciate.

    Because the URL is a free text field, the same node works against any OpenAI-compatible chat endpoint, not just Ollama. And it retries sensibly: transient failures (429, timeout) get retried up to max_retries times, while a 4xx auth error breaks immediately so you don't hammer a bad key.

    The inputs that matter

    Most of the fields you can safely leave alone. These are the ones worth touching:

    • text - what you want translated, multiline.
    • model - dropdown of Ollama Cloud models (deepseek-v4-flash:cloud is the default). Note this list is hardcoded in the pack; if your model isn't there, use the custom_model field instead.
    • target_language - English / Japanese / Chinese / Korean.
    • translation_style - the five styles, and this is where the node earns its keep:
      • sd_prompt (default, recommended): outputs a comma-separated English SD/FLUX prompt with quality and style keywords. This is the one you want 90% of the time.
      • preserve_tags: translates the prose but leaves booru tags, (word:1.2) weights, <lora:name:1.0> and artist refs untouched - for when you're editing an existing prompt instead of starting from scratch.
      • natural, literal, concise: plain translations of decreasing warmth.
    • api_key - required in cloud mode.

    Optional but handy: temperature (0.3 default - good for translation; crank it if you want the LLM to get creative with tag suggestions), max_tokens (512 default), seed (bumping it forces a re-run and dodges ComfyUI's cache), and custom_model which overrides the dropdown entirely.

    Outputs

    Two strings: translated_text - the good stuff, wire it into the text input of a CLIP Text Encode node - and original_text, which just echoes your input, useful for comparison or if you want to chain the translation into another node while keeping the source around.

    Install & gotchas

    Install via ComfyUI Manager (search Comfy_olima) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/utahime12/Comfy_olima.git
    

    Then restart ComfyUI. The pack's only dependency is requests, which you already have - no model downloads, no heavy installs.

    Two things that bite people:

    • In cloud mode the API key is mandatory. Leave it blank and the node won't crash - it returns an [Error] ... string as its output, which then flows straight into your CLIP encoder if you're not looking. Any output starting with [Error] is a message, not a translation; read it.
    • The dropdown is a snapshot. Model names drift. If you get a 404-ish error for a model, run the pack's Ollama Cloud Model List node to see what your server actually has, then put that name in custom_model.

    One honest caveat, same as every API LLM node: your text and key leave the machine and go to ollama.com, and cloud APIs have their own content filtering. If that matters to you, flip base_url to local and run the same node for free on your own Ollama - that's the mode a lot of people end up on. The translator stays identical; only the server changes.

    Categoryutils/translation

    Inputs (11)

    NameTypeDefaultDescription
    textSTRING์—ฌ๊ธฐ์— ๋ฒˆ์—ญํ•  ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.โ€”
    modelCOMBOdeepseek-v4-flash:cloud8 options: deepseek-v4-flash:cloud, deepseek-v3.1:671b-cloud, gpt-oss:120b-cloud, gpt-oss:20b-cloud, qwen3-coder:480b-cloud, kimi-k2:1t-cloud, +2
    target_languageCOMBOEnglish4 options: English, Japanese, Chinese, Korean
    translation_styleCOMBOsd_prompt5 options: natural, sd_prompt, preserve_tags, literal, concise
    api_keySTRINGโ€”
    custom_modeloptSTRINGโ€”
    base_urloptSTRINGhttps://ollama.com/v1โ€”
    temperatureoptFLOAT0.300โ€“2โ€”
    max_tokensoptINT51264โ€“8192โ€”
    max_retriesoptINT20โ€“5โ€”
    seedoptINT00โ€“4294967295โ€”

    Outputs (2)

    NameTypeDescription
    translated_textSTRINGโ€”
    original_textSTRINGโ€”