FunUI Apply Prompt Markup
Making (word:1.5) mean something on an LLM encoder
- model
- clip
- positive
- latent
- markup
- model
- positive
- status
If you came from SD 1.5 or SDXL, you learned that (cinematic lighting:1.3) is how you push a concept. On a 2026 model with an LLM text encoder - Qwen, Gemma, Mistral - that whole syntax is dead. Not weakened, not "less effective": ComfyUI's encoder wrapper disables prompt weighting for those encoders, so your parentheses arrive at the model as literal punctuation inside an instruction. Which is worse than deleting them.
FunUI's answer is a two-node pair. FunUI Prompt Markup takes the markup out of your text and hands you the clean text plus a parsed payload; FunUI Apply Prompt Markup, this node, puts the effect back on the model where it can actually do something. It's one of the more interesting things in the pack, and it's the one most likely to confuse you if you wire it backwards.
How it actually works
The trick is that on a model like MiniMax H3, your prompt text sits inside the attention sequence, in the same packed stream as the video tokens. So instead of scaling embeddings, this node adds a logit bias of log(w) to the attention logits on the phrase's key positions. softmax(logits + log w) multiplies that key's share of attention by w, which is what a weight is supposed to mean in the first place. Scaling the embedding vector instead wouldn't work - those rows are contextual hidden states with no per-word magnitude to turn up.
Three markups go through, all stripped in one pass by the companion node:
(phrase:1.5)or[phrase:1.5]- a weight.[[email protected]]- a timed phrase, visible only to the video rows inside that second range. You can combine it:[phrase:[email protected]].[phraseA|phraseB]or[A|B:0.8]- a blend,(1-s)*A + s*Bover the prompt rows.
The inputs that matter
Five required inputs, and every one of them is doing a job:
- model - gets patched, and you get a clone back; any previous FunUI markup left on it is stripped first, so running the same model through twice doesn't double the effect.
- clip - needed because blends re-encode the alternative text through the same encoder.
- positive - the conditioning to modify. It has to be an encoding of the clean text that Prompt Markup gave you.
- latent - a timed phrase is measured in seconds, and the node needs the video's frame grid to turn 2.5s into a set of rows. No latent, no timed windows.
- markup - the
FUNUI_MARKUPpayload from Prompt Markup.
Out comes a patched model, a new positive, and a status string. Wire model and positive onward into the sampler like nothing happened.
Read the status, seriously
The status output is the whole debugging story and it's worth a text-note node or a preview. It says no markup when there was nothing to apply, or tells you exactly why it bailed:
- "this text encoder is not one a model module can place words in" - the encoder family isn't one FunUI can map tokens into.
- "the encoded prompt does not match this text - was the clean text from Prompt Markup what got encoded?" - the classic wiring mistake. You left the raw
[a|b]prompt in your CLIP Text Encode. Thecleanoutput is the thing that gets encoded.
A timed window that falls outside the clip length gets ignored with a line in the log, not a crash.
Installing it
Manager, or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/digital-garbage/FunUI
pip install -r requirements.txt
comfy node install FunUI also works - it ships on Comfy Registry. Restart, open /fun/ on your ComfyUI address. FunUI is module-based, so if these two nodes don't appear in the node list at all, the Prompt markup module is off in Settings ▸ Modules or failed to load; the log says which.
Read what pip wants to change before you say yes. It'll want comfy-kitchen>=0.2.32, and that one is compiled against torch.
Where people get burned
Blends cost encodes. Each [a|b] re-runs the encoder for the alternative text, so a prompt full of them gets slow, and the author's own note is that blend quality has never been judged, only that it runs. Weights and timed phrases are the proven pair.
Don't crank the weight. The bias is capped in code, deliberately: past a certain point a phrase wins every query regardless of content and the prompt reads as having collapsed onto one word. Overlapping spans do add - a phrase and one of its own words - but the total is bounded too. The old 0.5–1.5 habit is still the range that behaves.
It is not a fix for everything. On a non-distilled base running real CFG, plain prompting and a working negative prompt still do more than markup does. This node exists because the alternative on H3 and LTX-2 was nothing at all.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| positive | CONDITIONING | — | |
| latent | LATENT | — | |
| markup | FUNUI_MARKUP | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| status | STRING | — |