🌐AGSoft Translate Plus
Translate your prompts without an API key — and keep the dialogue untranslated
- translated_text
- translation_info
- service_info
🌐 AGSoft Translate Plus is the "fixed and extended" follow-up to the plain AGSoft Translate node, and if you're building ComfyUI workflows that need to move text between languages - prompts, dialogue scripts for the video pipelines, batch label text - it's the one you want. The headline feature that makes it worth a look over a pile of other translation nodes: it can refuse to translate parts of your text. Wrap something in <d>...</d>, or stick it in quotes, and it comes out the other side exactly as it went in.
It works on the free translators Python library, which scrapes the public web endpoints of Google, Bing, Yandex, DeepL, and a dozen others. That means no API key, no signup, no config file - you pick a service in a dropdown and go. The name isn't promising anything shady; it genuinely calls no paid API. The trade-off for free is stability: those endpoints rotate, rate limits happen, and Google occasionally blocks. That's exactly why the node is built the way it is.
How it actually works
The mechanism is defensive by design. It calls your chosen service through translators, and if the call fails it automatically walks a fallback chain of google → bing → yandex before giving up. Each translated part is saved to a local JSON cache (in ComfyUI's user directory under agsoft/translate_plus_cache.json) keyed by text, service, and languages - rerun the same workflow and cached chunks don't hit the network again. There's a preaccelerate toggle that pings the service once to warm it up before the real batch, plus a session reset on error.
For long input, set batch_separator (default \n---\n) and the text splits into parts that get translated one at a time with a sleep_seconds delay between requests - that pacing is your first defense against getting rate-limited into the fallback chain. Flip async_mode on with max_workers to translate parts in parallel threads instead, when you care about speed more than politeness.
The inputs and outputs that matter
You set three things and everything else has sane defaults. text is your source. service defaults to google - the tooltip's own recommendation; the stable alternates are bing and yandex, and deepl is "high quality but possibly limited." target_language defaults to Russian, with ~80 languages to pick from, and source_language auto-detects unless you say otherwise.
The genuinely useful toggles, once you're past a first run: protect_fragments turns on the untranslated-fragment behavior, with protect_template controlling what gets protected - <d>...</d> tags, [d]...[/d], or quoted speech only (the "markers" list, which defaults to a pile of quote styles plus square brackets). If a dialogue line is already in the language you want, protecting it stops the translator from mangling it into your target language and back again. custom_source_lang / custom_target_lang accept raw codes like en or hy when the dropdown doesn't have your language. invert_direction swaps source and target - handy for round-trips - and if the swap would leave target as "auto," it's forced to English to avoid API errors. use_cache is on by default; leave it that way.
Three outputs: translated_text (wire this into your prompt/text input), translation_info (a human-readable line about direction, mode, part count, cache state - nice for a Show Text debug node), and service_info (a recommendation dump, only populated when show_service_info is on).
Installing it
This node ships inside a big pack (~90 nodes), so you install all of AGSoft. Via ComfyUI Manager, search comfyui-AGSoft and install. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
Then restart ComfyUI. The pack's requirements.txt pulls in exactly one dependency you care about here, the translators library - Manager handles it, and if it isn't installed the node's validation actually tells you so before you queue, returning an error string instead of silently failing.
Where people get burned
Rate limiting is the recurring annoyance. When Google starts refusing, you see the fallback chain working - but translation slows down as it retries. Raise sleep_seconds toward 1–2 if you're hammering it with big batches. And remember the <d> gotcha: dropdowns eat <...> as HTML, so the templates display as ‹d› in the menu but the actual pattern is real <d>...</d>. Finally, if your output text mysteriously has lines joined differently than your input, it's the batch separator doing its job - set it empty if you want the whole text handled as one blob.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Hello, world! Привет, мир! | Text to translate. If batch_separator exists, the text is split and translated in parts. Protected fragments are kept untranslated. --- Текст для перевода. Если присутствует разделитель пакетной обработки, текст разбивается и переводится частями. Защищённые фрагменты остаются без перевода. |
| service | COMBO | Translation service. Recommended default: google. Stable alternatives: bing, yandex. High quality but possibly limited: deepl. --- Сервис перевода. Рекомендуемый по умолчанию: google. Стабильные альтернативы: bing, yandex. Высокое качество, но возможны ограничения: deepl. | |
| target_language | COMBO | Russian - Русский | Target language for translation. Can be overridden by custom_target_lang. --- Целевой язык перевода. Может быть переопределён полем custom_target_lang. |
| source_languageopt | COMBO | Auto detect - Автодетект | Source language. Auto detect lets the translation service decide. --- Исходный язык. Автодетект позволяет сервису перевода определить язык самому. |
| custom_source_langopt | STRING | Custom source language code, e.g. 'en', 'ru', 'hy'. Leave empty to use source_language. --- Пользовательский код исходного языка, например 'en', 'ru', 'hy'. Оставьте пустым, чтобы использовать source_language. | |
| custom_target_langopt | STRING | Custom target language code, e.g. 'en', 'ru', 'hy'. Overrides target_language. Cannot be 'auto'. --- Пользовательский код целевого языка, например 'en', 'ru', 'hy'. Переопределяет target_language. Не может быть 'auto'. | |
| sleep_secondsopt | FLOAT | 0.50.1–5 | Delay between translation requests in seconds. Helps reduce rate limit problems. --- Задержка между запросами перевода в секундах. Помогает снизить риск срабатывания лимитов. |
| invert_directionopt | BOOLEAN | false | Swap source and target languages. If target becomes auto after inversion, it is forced to English to avoid API errors. --- Поменять местами исходный и целевой языки. Если после инверсии целевой язык становится auto, он принудительно заменяется на English. |
| use_cacheopt | BOOLEAN | true | Store translated parts in a local JSON cache and reuse them later. --- Сохранять переведённые части в локальном JSON-кэше и использовать их повторно. |
| async_modeopt | BOOLEAN | false | Translate batch parts in parallel threads. Useful only when the text is split by batch_separator. --- Переводить части пакета в параллельных потоках. Полезно только если текст разбит разделителем batch_separator. |
| max_workersopt | INT | 31–10 | Maximum number of parallel translation threads for async_mode. --- Максимальное количество параллельных потоков перевода для async_mode. |
| preaccelerateopt | BOOLEAN | false | Try to pre-accelerate the selected translators server before translation. --- Попробовать заранее ускорить выбранный сервер translators перед переводом. |
| batch_separatoropt | STRING | \n---\n | Separator for batch translation. Use \n for newline. If empty, no batch splitting is performed. --- Разделитель для пакетного перевода. Используйте \n для новой строки. Если пусто, разбиение не выполняется. |
| protect_fragmentsopt | BOOLEAN | false | If enabled, fragments found by protect_template/tag_start/tag_end/markers are NOT translated and are restored after translation. --- Если включено, фрагменты, найденные по protect_template/tag_start/tag_end/markers, НЕ переводятся и восстанавливаются после перевода. |
| protect_templateopt | COMBO | ‹d›....‹/d› + markers | Protection template. The menu shows ‹d› instead of <d> for HTML safety. Examples: • ‹d›....‹/d› + markers = <d>...</d> plus quotes/markers • ‹d›....‹/d› = only <d>...</d> • [d]....[/d] = square bracket dialog tags • markers only = only symbol pairs from markers field • Custom tags = use tag_start/tag_end and markers --- Шаблон защиты. В меню показывается ‹d› вместо <d> для HTML-безопасности. Примеры: • ‹d›....‹/d› + markers = <d>...</d> плюс кавычки/маркеры • ‹d›....‹/d› = только <d>...</d> • [d]....[/d] = квадратные теги диалога • markers only = только пары символов из поля markers • Custom tags = использовать tag_start/tag_end и markers |
| tag_startopt | STRING | <d> | Opening tag for Custom tags mode. Examples: <d>, [dialog], {{say}}. Ignored by preset templates. --- Открывающий тег для режима Custom tags. Примеры: <d>, [dialog], {{say}}. Игнорируется пресетными шаблонами. |
| tag_endopt | STRING | </d> | Closing tag for Custom tags mode. Examples: </d>, [/dialog], {{/say}}. Ignored by preset templates. --- Закрывающий тег для режима Custom tags. Примеры: </d>, [/dialog], {{/say}}. Игнорируется пресетными шаблонами. |
| markersopt | STRING | " ", « », “ ”, ‘ ’, „ “, ‚ ‘, ‹ ›, [ ] | Symbol pairs that wrap protected fragments. Default contains quotes and square brackets: " ", « », “ ”, ‘ ’, [ ]. You can add any pairs separated by commas, spaces or new lines. For multi-character markers use space or vertical bar: << >> or <<|>>. --- Пары символов, оборачивающие защищённые фрагменты. По умолчанию содержат кавычки и квадратные скобки: " ", « », “ ”, ‘ ’, [ ]. Можно добавлять любые пары через запятую, пробел или новую строку. Для многозначных маркеров используйте пробел или вертикальную черту: << >> или <<|>>. |
| show_service_infoopt | BOOLEAN | false | Show detailed information about translation services and recommendations. --- Показать подробную информацию о сервисах перевода и рекомендациях. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| translated_text | STRING | — |
| translation_info | STRING | — |
| service_info | STRING | — |