Nodes/ComfyUI_TranslateLocally/Download and select Translate Model
ComfyUI Node

Download and select Translate Model

The Node That Downloads Translation Models and Saves You From Typos

By Fictiverse·Created 7 months ago·Updated 7 months ago· 0
Download and select Translate Model
    • STRING
    model

    This node does two boring-but-important jobs for the TranslateLocally pack: it turns the official model list into a dropdown you can't misspell, and it downloads a model on demand the first time you pick it. It's the quiet half of the pack - no translation happens here - but you'll wire it into every workflow anyway, because it's what makes the actual translate node behave.

    What it is

    Download and select Translate Model is the companion to Translate Locally (Offline). It lists the 31 official models supported by the underlying translateLocally binary - English paired with 18 other languages, mostly European: Czech, German, Spanish, French, Polish, Bulgarian, Estonian, Icelandic, Norwegian, and a dozen more. Each pair comes in tiny or base size. Pick one and the node hands you the model code as a STRING. Wire that into the translate node's model input and you never type en-fr-tiny wrong again.

    How it works

    Under the hood it asks the binary which models are already sitting in the local cache (--list-models). If the one you picked is there, you get the code back instantly. If it's missing, the node calls --download-model <code>, waits for the download, re-checks the list, and only then returns the code. So the first selection in a session costs a download; every selection after that is instant. Models are cached once and reused - nothing gets redownloaded.

    The one input and the one output

    • model (dropdown, 31 choices) - pick your pair. The naming is source-target-size, so en-fr-tiny is English→French in the tiny size. Where both directions exist you'll see two entries, like fr-en-tiny and en-fr-tiny.
    • STRING output - the model code. Wire it into TranslateLocally's model input and you're done. That's the whole loop, and it's exactly how the pack's example workflow is set up.

    Why bother, when TranslateLocally takes a plain string anyway?

    Two reasons. First, typos: TranslateLocally's model field is free text, and a misspelled code produces a confusing error string instead of a translation. A dropdown makes that impossible. Second, auto-download: if you just type a model code into the translate node, nothing fetches it - this node is what actually downloads the file into the shared cache so the translate call succeeds. If you prefer translating to downloading, that's the part to keep in mind.

    Installing it

    Same as the whole pack - the sibling article has the full walkthrough. Short version: clone the repo into ComfyUI/custom_nodes, then manually place translateLocally.exe (downloaded from the XapaJIaMnu/translateLocally releases page, renamed exactly) inside ComfyUI_TranslateLocally/. No Python dependencies, and Windows-only in practice because the binary is an .exe. ComfyUI Manager can install the node code but not the binary, so that one manual step is yours either way.

    Gotchas

    • The dropdown is a fixed list. If your language pair isn't among the 31, this node can't add it. You can still type an unknown code directly into TranslateLocally's model field - but if the binary doesn't know it, you'll get an error string, not a translation.
    • tiny vs base. tiny models are fast and light, perfect for short prompts. base gives noticeably better quality on longer text at the cost of download size and speed. For prompt translation, tiny is usually plenty.
    • Some pairs are one-way. English↔French and English↔German go both directions, but many entries are single-direction (Ukrainian→English has no English→Ukrainian twin). Check the list before assuming the reverse exists.

    If you're on Windows and translating prompts locally, this is the node you wire in once and forget - it quietly keeps your models downloaded and your codes correct.

    CategoryText / Translation

    Inputs (1)

    NameTypeDefaultDescription
    modelCOMBO31 options: cs-en-base, cs-en-tiny, en-cs-base, en-cs-tiny, de-en-base, de-en-tiny, +25

    Outputs (1)

    NameTypeDescription
    STRINGSTRING