Emphasis Encode Advanced [EXPERIMENTAL] (CCN)
A1111 emphasis for T5 models, now with a normalization mode
- clip
- conditioning
- parsed_info
- debug_output
This is the same engine as Emphasis Encode - parse (word:1.3)-style markers, strip them, multiply token weights, re-encode - with one addition: a normalization dropdown that fixes the side effect the plain node ignores. When you crank several tokens hard, the whole conditioning's energy can shift with them, which is how you get emphasis that "works" and also makes everything slightly wrong. The Advanced node gives you four ways to pull the result back toward a sane distribution, mirroring what A1111's own emphasis modes used to do.
What the normalization modes actually do
- none - exactly the base Emphasis Encode behavior. Weights go in, whatever comes out comes out.
- mean_restore (default) - after weighting, it recenters the conditioning so the mean lands back where it was. This is the "do no harm" default: emphasis applies, but the overall energy doesn't drift.
- max_norm - divides by the max absolute value, capping the peak. Good when a heavy
(word:1.5)is blowing out the response. - std_norm - divides by the standard deviation, which evens out how spread out the conditioning is. Useful if your emphasized tokens are dominating too aggressively relative to the rest.
You'll rarely touch this after you pick one. The rule of thumb: keep mean_restore until you notice the output getting hot or washed out, then try max_norm to clamp the top end.
What to wire where
Inputs are clip, text, normalization, and debug (same console diagnostic as the base node - turn it on to see the character-to-token estimate and which tokens got multiplied). The output you want is conditioning, straight into your sampler. The other two outputs, parsed_info and debug_output, are strings describing what the node did; they're for logging and troubleshooting, not for the image.
Same install, same caveats
It's part of ComfyCollectorNodes, so you get it the same way as the plain node:
cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes
then restart ComfyUI. No extra dependencies, no model files - Manager also has it under ComfyCollectorNodes.
The experimental caveats carry over in full. Token boundaries don't align with word boundaries, so the character-to-token mapping is approximate; short phrases work better than sentences. And T5/Wan encoders vary wildly in how much token-weight fiddling they respect - some models respond, some politely ignore you. The normalization modes don't fix model resilience; they fix energy drift. If a word still isn't cooperating after switching modes, check the debug output to confirm the emphasis landed on the tokens you think it did. If you only need simple emphasis and no normalization, the plain Emphasis Encode is fine - this node is worth it once you start stacking multiple weighted terms and want the balance to stay put.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| text | STRING | — | |
| normalization | COMBO | mean_restore | 4 options: none, mean_restore, max_norm, std_norm |
| debug | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| parsed_info | STRING | — |
| debug_output | STRING | — |