TextMultiline
A multiline text box that secretly calls macOS Shortcuts to translate
- STRING
TextMultiline is two nodes in one. On the surface it's a plain multiline text field - the kind of thing every workflow needs for a long prompt or a block of notes, with a STRING output you can wire anywhere a string goes. But it has a party trick no other text node has: set its direction to anything but none and it will shell out to macOS Shortcuts to translate the text for you. The pack's own description says it straight: "Mac Translation Magic 🪄… Only on Mac!"
Honestly, the translation feature is the reason to care, and also the reason to be careful. The node was built by a bilingual author (the ComfyPanel README ships in English and Chinese), and it's a genuinely clever way to get zh↔en translation in a workflow without any cloud API. It's also a thing that will silently fail if you're not on a Mac with the shortcuts set up.
How it works
Two widgets:
text- a multiline STRING. Your prompt or text block.direction-auto,zh-en,en-zh, ornone. Default isnone.
With direction set to none, it just trims and returns the text - a boring, dependable multiline text node. With a translation direction, it detects whether the text contains letters or CJK characters, then runs a macOS Shortcuts command like shortcuts run Translate_ZHToEN (or Translate_ENToZH) via the shell, captures stdout, and returns the translated text. auto guesses the source language by comparing the number of Latin letters against CJK characters.
The key gotcha: those shortcut names don't exist until you create them. This node calls shortcuts you define yourself in the macOS Shortcuts app - create two shortcuts named exactly Translate_ZHToEN and Translate_ENToZH that pipe their input to the built-in Translate action, and the magic works. If the shortcut is missing, the node doesn't crash; it returns an error string as the output, which can be a quiet surprise if it flows into a prompt.
What you'd use it for
If you write prompts in both languages - or copy prompts from Chinese sources - a translation box that runs locally with zero API cost is handy. It's the kind of small, opinionated utility that only makes sense inside a pack that's bilingual at the core. For everyone else, direction: none gives you a clean multiline string node that's perfectly serviceable.
The real talk
On Windows or Linux, the translation path will fail (there's no shortcuts command), so keep direction at none and treat this as a plain text box. Even on a Mac, the translation is only as good as the shortcuts you wired up, and output can include the odd extra newline the node then has to clean up. It's a fun, working node - but the multiline-text part is the reliable half, and the translation is the half you configure once and forget.
Installing it
It ships in ComfyPanel:
cd ComfyUI/custom_nodes
git clone https://github.com/Ginolazy/ComfyPanel
Restart ComfyUI, or search ComfyPanel in ComfyUI Manager. Standard requirements (torch/numpy/Pillow plus kornia, scipy, opencv-python), no model downloads.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| direction | COMBO | none | 4 options: auto, zh-en, en-zh, none |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |