Nodes/ComfyUI-Magic-Assistant/📝 多功能提示词框 Magic Multi-Function Prompt Box
ComfyUI Node

📝 多功能提示词框 Magic Multi-Function Prompt Box

The Danbooru-style prompt editor with 220k tags and an autocomplete that speaks Chinese

By shigjfg·Created 8 months ago·Updated 11 days ago· 37
📝 多功能提示词框 Magic Multi-Function Prompt Box
  • clip
  • final_text
  • conditioning
  • clip
text
prepend_text

Anime models like Illustrious and NoobAI don't speak sentences - they speak Danbooru tags, and a correctly-chosen tag beats a whole descriptive phrase for control. Magic Prompt Box is a prompt editor built around that fact: it ships a local database of over 220,000 tags, gives you autocomplete as you type, and parses your text into draggable tag chips you can weight, parenthesize, reorder, mask, or translate. If you've ever stared at a Danbooru tag list wondering what 1girl means in your own language, this is the node that answers.

The edit button on the node opens the real workspace. Tags autocomplete with the English tag on the left and a Chinese gloss on the right, you can search the 220k+ library with English or Chinese (case-insensitive), and there's a live Danbooru mode that pulls category and popularity from the site itself, sorted by popularity. History saves your successful runs automatically so you can re-apply them later. This is the rare prompt box that's worth installing just for its editor, even before you care about the outputs.

What the node itself does

The text editor is the show, but the node is a proper piece of the graph too. Its schema is small:

  • text (STRING, multiline) - your prompt
  • prepend_text (STRING, optional) - anything wired in here gets merged to the front, so you can pipe a dynamic or scripted prefix in
  • clip (CLIP, optional) - connect your text encoder and the node encodes for you

And it returns three things: final_text (STRING), conditioning (CONDITIONING), and clip (CLIP, passed through). So it can stand in for a CLIP Text Encode node and hand both the text and the encoding downstream. The one behavior to learn is the mask symbol: any segment starting with * is kept in the node but excluded from final_text and from encoding - the same "disabled tag" concept as the editor's double-click, but preserved when you connect a string from elsewhere.

Where people get burned

The prepend_text path is the sneaky one. It's the "text point input" added in V1.2.5, and the masking filter applies to it too - the changelog explicitly says masking is applied so you can't bypass it by wiring around the node. If a masked segment keeps showing up in your output, it's coming from the prepend path.

The LLM-powered bits (tag translation, inline Chinese-to-English conversion) need a model configured under "Manage LLM," which shares its config file with the pack's Magic Prompt Replace node. No LLM configured, no translation - the tag library itself works fine without one, so don't let that stop you. And there's a settings toggle to turn the autocomplete popup off if it gets noisy, which is a nicer safety valve than most editors offer.

Installing

It's part of the Magic-Assistant pack:

cd ComfyUI/custom_nodes/
git clone https://github.com/shigjfg/ComfyUI-Magic-Assistant.git
cd ComfyUI-Magic-Assistant && pip install -r requirements.txt

Restart, then find it under "✨ Magic Assistant". The 220k tag database ships with the pack (no download). One maintenance note from the changelog: after a major update, if the editor settings misbehave, delete userdata/settings.txt under the node directory - it only stores UI preferences, and old versions of that file are incompatible with new ones. New users never hit this.

Category✨ Magic Assistant

Inputs (3)

NameTypeDefaultDescription
textSTRING
prepend_textoptSTRING
clipoptCLIP

Outputs (3)

NameTypeDescription
final_textSTRING
conditioningCONDITIONING
clipCLIP