ComfyUI Node

Top Features

Top Features — the bar chart and the markdown table that name the heavy hitters

By Nynxz·Created 4 months ago·Updated 4 months ago· 0
Top Features
  • features
  • bars
  • table
top_k16

Top Features is the ranking node: after you analyze a prompt, it tells you which features fired hardest on average, twice - as a bar chart IMAGE and as a markdown STRING table you can copy straight into notes or a prompt. It's the fastest route from "I analyzed a sentence" to "here are the feature IDs worth writing down."

It earns its place in the pipeline because it gives you the numbers you act on. The heatmap shows you where features fire; this node tells you which ones matter. The feature IDs it hands you are exactly what you type into Feature → Direction to start steering, or what you note down when you find something interesting. There's a satisfying loop here: analyze a batch of cinematic prompts, watch the same three feature IDs climb the ranking every time, and you've found the pack's built-in "cinematic" buttons.

How it works

It takes the per-token feature activations from the QSCOPE_FEATURES bundle and computes each feature's mean activation across all tokens. The top top_k (default 16) become both the bars in the image - a quick visual read of relative strength - and the rows in the markdown table, which includes rank, feature ID, mean act and peak act. The peak column matters: a feature can have a low mean but spike on one token, which the mean-only bar chart hides. Feature IDs in the table are click-and-type-into-steering ready.

The inputs

  • features - the QSCOPE_FEATURES output from Analyze Prompt (SAE) or Analyze CLIP (SAE).
  • top_k - how many features to rank (default 16, up to 200). 16 is plenty for a scan; go to 50 when hunting for rare-but-strong features via the peak column.

Outputs: bars (IMAGE) for the bar chart, and table (STRING) - a markdown table you can paste into a text note, a comment, or a workflow's text widget. Both render from the same computation.

Installing it

Same pack, one install: ComfyUI Manager → search "ComfyUI QwenScope", or

cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-QwenScope

restart. Standard deps (transformers, huggingface_hub, safetensors, Pillow, numpy). Rendering is CPU-side, so the node is instant after the Analyze step.

Common issues

The one thing people trip on is reading the peak column wrong: a feature that ranks low by mean but high by peak is still interesting - it's a "trigger word" feature, and it's often a better candidate for steering than the mean leaders, because steering a spike-on-one-word feature produces a more targeted effect. If the ranking feels noisy, it usually reflects a noisy capture: top_k=0 on the Analyze side (ReLU mode) floods the ranking with low-activation features, so keep analyze's top_k at a sane value (like the default 64) before trusting the table.

CategoryQwenScope/Inspect

Inputs (2)

NameTypeDefaultDescription
featuresQSCOPE_FEATURES
top_kINT161–200

Outputs (2)

NameTypeDescription
barsIMAGE
tableSTRING