π Convert Chinese (OpenCC)
Simplified β traditional Chinese subtitles, with Taiwan's actual vocabulary
- converted_text
- saved_path
MF_ConvertChinese converts between simplified and traditional Chinese, and it's the rare node with a genuinely niche superpower: it runs on OpenCC, whose profiles don't just swap character forms - they swap vocabulary. The default profile, s2twp, converts simplified to traditional with Taiwan wording: δΏ‘ζ― becomes θ³θ¨, ηΆ²η΅‘ becomes ηΆ²θ·―. That's the difference between subtitles a Taiwanese viewer finds natural and subtitles that read like a mainland transcript wearing a traditional-font costume.
Where it lives in a workflow: after translation, before burning. MediaForge's AI chain produces SRT as a string (MF_TranslateSubtitle.translated_srt); if that translation came out in simplified Chinese and your audience is Taiwanese, this node is the normalization step between the translator and MF_BurnSubtitle. It also works on plain text, and it can read an SRT file directly from disk.
How it works
OpenCC does character-level mapping, which is exactly what makes it safe for subtitles: the SRT timestamps and index lines pass through untouched because only the text content changes. There's no LLM and no chance of "the AI rewrote my timing." Paste text or wire a STRING in, pick a profile, and you get text back - or set filename_prefix and it writes output/<prefix>_NNNNN.srt (it decides .srt vs .txt by whether the content contains --> timestamps).
The inputs that matter
profile- the four OpenCC presets:s2twp(simplified β traditional, Taiwan vocab - the default, and the one you want for Taiwanese audiences),s2t(plain simpβtrad, no vocab swap),tw2sp(Taiwan traditional β simplified),t2s(plain tradβsimp).text- paste text or wire it from an upstream STRING.input_path(optional) - read from a file instead; used only whentextis empty. Auto-detects encoding (UTF-8 / GBK / BIG5 / UTF-16) viacharset-normalizer.filename_prefix(optional) - non-empty writes a saved file; empty = in-memory only.
Outputs: converted_text (STRING) and saved_path (STRING, empty if no prefix given).
Install
Part of MediaForge. The opencc-python-reimplemented backend is a pure-Python, zero-C++ OpenCC port and it's in the pack's requirements.txt, so ComfyUI Manager (or a manual pip install -r requirements.txt) installs it automatically - no extra step:
cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI
Common issues
The main trap is expecting traditional Chinese viewers to be fine with any traditional conversion - they're not; s2t produces grammatically mainland phrasing in traditional glyphs, which reads off. If your audience is Taiwan/HK, use s2twp. For non-UTF-8 SRT files, the encoding auto-detection needs charset-normalizer - it's in requirements.txt, but if you see a decode error, that's the dependency to check. And remember input_path is ignored while text is non-empty - empty the text field to switch to file mode.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| profile | COMBO | s2twp (η°‘βηΉε°η£θ©εΊ«) | 4 options: s2twp (η°‘βηΉε°η£θ©εΊ«), s2t (η°‘βηΉιη¨), tw2sp (ηΉε°η£βη°‘), t2s (ηΉιη¨βη°‘) |
| text | STRING | β | |
| input_pathopt | STRING | β | |
| filename_prefixopt | STRING | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| converted_text | STRING | β |
| saved_path | STRING | β |