页面旁白删除器 / Page Narration Remover
Sweep the page-narration lines out of your script
- clean_text
In the RUI-Nodes comic-production toolchain, scripts often carry page-level narration - little "this page establishes the setting" notes that shouldn't make it into the final rendered text. Page Narration Remover is the broom: it takes your text and deletes every line that starts with "页面旁白:" or "页面旁白:", returning the cleaned remainder. That's it. That's the whole node.
Don't mistake the simplicity for uselessness. In a pipeline where a storyboard script flows through several stages, stripping narration lines is the kind of preprocessing step that turns into a recurring, annoying manual chore - unless you automate it. This node is the automation. It pairs naturally with Dialogue Extractor (pull the actual dialogue out) and Shot Splitter (break the script into shots) from the same pack. Line them up and you've got a clean text-handling stage between your LLM and your render loop.
How it works
You feed input_text (multi-line) in, and you get clean_text out - one string, the same text with the offending lines removed. The matching rules are deliberately simple and safe:
- A line is deleted if it starts with
页面旁白:or页面旁白:. - Leading/trailing whitespace on the line is ignored, so indented narration still gets caught.
- Everything else - dialogue, descriptions, blank lines - is preserved exactly as-is.
Only whole lines starting with the marker are removed; a sentence that merely contains "页面旁白" in the middle is untouched, which keeps it from nuking legitimate prose. The output is a single STRING, ready to wire into another text node or a save node.
Installing it
Part of the RUI-Nodes pack ("Rui-Node🐶"). Install once via ComfyUI Manager (search "RUI-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/rui40000/RUI-Nodes
cd RUI-Nodes
pip install -r requirements.txt
Restart after. Pure Python line filtering - no dependencies beyond the base pack.
Where people get burned
Honestly, the only way to get burned is to expect it to be cleverer than it is. It matches the exact prefix 页面旁白, so if your scripts use a different marker - "页旁白", "Page narration:", or an English equivalent - nothing gets removed. Either normalize your script format upstream, or reach for a general text node that can do regex. And remember it operates on whole lines: if your narration is inline at the end of a description line rather than on its own line, this node won't catch it. Feed it scripts where the narration is properly line-delimited and it'll never surprise you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input_text | STRING | 原始文本(多行)。节点会删掉形如 页面旁白:"……" 这样单独成行的旁白,其余内容原样保留。 只处理独占一行的旁白,行内夹带的不会被误删。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| clean_text | STRING | — |