๐ Kisekae Debug Prompt
Read the prompt before you spend the render
- char
- clip
- char
- text
You've built a chain of six nodes and you're about to find out what it renders by waiting forty seconds for a 2B model at 40 steps. That's an expensive way to discover a placeholder isn't in your template.
๐ Kisekae Debug Prompt renders the character exactly as Kisekae Prompt would, then shows you the report instead of the wire: positive, negative, a per-placeholder breakdown, what got deduped, what got escaped, LoRA status, and a token count.
How it works
It shares its render code with the Prompt node - same template parsing, same escaping, same dedupe, same negative-conflict dropping - so what you see here is what the sampler will see. It takes the character, renders it, then formats a report:
- POSITIVE / NEGATIVE - the finished strings.
- PLACEHOLDERS - each placeholder in your template and the items it produced, aligned in a column. This is the fastest way to find out that
{scene.lighting}is empty because nobody set lighting, rather than misrendered. - DUPLICATES REMOVED - exact repeats that
dedupecollapsed. - BRACKETS ESCAPED - tag โ escaped tag pairs, so
menacing (jojo)โmenacing \(jojo\)is visible rather than mysterious. - NEGATIVES DROPPED (also in positive) - negatives that would have fought a positive tag. Worth a glance: it can quietly swallow a negative you meant to keep.
- LORAS - each LoRA with its section, strengths and resolution status: found, found-elsewhere (
โ โ path), ambiguous (โ 3 files match), orโ NOT FOUND - left out of the stack. - TRIGGERS - the joined trigger words.
Then token counts. With nothing on the clip input you get a rough estimate - words plus punctuation, definitely not a real tokenizer - and the node says so. Connect your actual CLIP (the same one you feed your text encode nodes) and it walks the tokenizers inside it, giving you an exact count per encoder: clip_l and clip_g on SDXL-lineage checkpoints, qwen3_06b on Anima, t5xxl where relevant. For the CLIP pair it also does the arithmetic you'd otherwise do in your head - (n-2)/75 rounded up, i.e. how many 75-token chunks you're occupying. Escapes are stripped before counting, since the tokenizer sees ( not \(.
The inputs and outputs
char is required. template, template_text, escape_parens, dedupe, include_triggers behave identically to the Prompt node - non-empty template_text wins, all three booleans default on. clip is the only optional input, and it's purely for counting; it doesn't affect the rendered text.
Outputs: char (unchanged) and text (the whole report). The report is also shown in the node's display box, which is how most people read it.
Install
Bundled with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Kagejitsu/comfyui-kisekae
Or ComfyUI Manager โ search kisekae (Registry: comfyui-kisekae). Restart. No Python dependencies - token counting uses whatever tokenizers ComfyUI already has loaded, so nothing extra to install and it degrades gracefully (skipping an encoder it can't introspect rather than failing the run).
Common issues
"โ N tokens (rough estimate)" and I connected a CLIP. The counts come from the tokenizer objects attached to the CLIP you wired. If you connected a CLIP that hasn't loaded yet, or a custom encoder wrapper without standard tokenizers, it falls back. Wire the same CLIP your encoder nodes use.
Token count is higher than I expected. On SDXL-lineage models you care about the 75-token chunks: two chunks is 150, three is 225, and your pretty prose is a rounding error against an outfit paragraph. On Anima the number is less of a hard limit and more of a budget signal, but it still tells you when a preset is bloated.
A LoRA shows โ. The preset's name is a path inside your loras folder. If the file moved, a uniquely-named match elsewhere is substituted; two candidates produce a โ and the first is used. Exact paths beat guessing.
Where's the prompt going? Nowhere - this node has no positive output on purpose. Use Kisekae Prompt for the real thing; use this for reading. If you want the string in a log, wire text.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| char | KISEKAE_CHAR | โ | |
| template | COMBO | Prompt layout. Add your own .txt files in user/default/kisekae/templates/ | |
| template_text | STRING | โ | |
| escape_parens | BOOLEAN | true | Escape brackets inside tags, e.g. menacing \(jojo\), so ComfyUI doesn't read them as emphasis. (tag:1.2) weights are kept. |
| dedupe | BOOLEAN | true | Remove exact repeated tags (first one kept) |
| include_triggers | BOOLEAN | true | Fill {triggers} with LoRA trigger words |
| clipopt | CLIP | Optional: connect your text encoder for exact token counts |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| char | KISEKAE_CHAR | โ |
| text | STRING | โ |