Token Activation Strip
Token Activation Strip — the prompt as colored chips, for one feature or all of them
- features
- strip
Token Activation Strip answers a very specific question: where in your prompt is a feature firing? It renders your prompt as a strip of colored chips - one per token - where the color says how strongly that token activated either a single feature you picked or, by default, the strongest feature at each token. It's the per-token view that the Feature Heatmap gives you as a grid; think of this as the horizontal slice through it.
It's the best node in the pack for the "reverse engineer a feature" workflow. You see feature #482 fire on the word "cinematic" in a heatmap; you feed the same capture to a Token Strip, pin feature_idx to 482, and watch exactly which tokens in the sentence trip it. That tells you what the feature actually responds to - which is the first step toward trusting it enough to steer with it.
How it works
It reads the QSCOPE_FEATURES bundle (tokens + per-token activations) from an Analyze node, and colors each token chip by activation intensity. The feature_idx input is the twist: set it to -1 (the default) and each token shows its per-token max activation across all features - a fast "which parts of this prompt are most feature-rich" scan. Point it at a specific feature and you get that feature's firing pattern alone, token by token. The title baked into the image records the SAE pack, layer, and which view you're looking at, so the output stays interpretable later.
The inputs
- features - the
QSCOPE_FEATURESoutput from Analyze Prompt (SAE) or Analyze CLIP (SAE). Only those two nodes produce this socket type. - feature_idx -
-1for per-token max, or any feature index (up to 200,000) to isolate one feature.
Output: a single strip IMAGE - a one-row ribbon of colored token chips with the token text. Wire it to Preview or Save Image; it's a terminal visualization node.
Installing it
Part of the one pack: ComfyUI Manager → search "ComfyUI QwenScope", or
cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-QwenScope
restart. Usual deps (transformers, huggingface_hub, safetensors, Pillow, numpy); rendering is CPU-side via Pillow, so it's instant.
Common issues
Two things to keep straight. First, the socket type - it takes QSCOPE_FEATURES, not a raw tensor; if your wire is red, you've bypassed Analyze. Second, the default -1 view is per-token max, which means the feature changes token to token - that's a summary, not a single feature's story. If you've been staring at a heatmap and expect the same feature throughout, pin feature_idx explicitly. And if the strip looks uniformly dark, your capture had weak activations - bump top_k on the Analyze side (or switch that pack's L0 from 50 to 100 for denser firing).
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| features | QSCOPE_FEATURES | — | |
| feature_idx | INT | -1-1–200000 | -1 = colour by per-token max activation across all features. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| strip | IMAGE | — |