Residual Steer (custom dir)
Residual Steer (custom dir) — bring your own direction vector
- direction
- steer
- info
Residual Steer (custom dir) is the "I have a direction tensor and I don't need an SAE feature or a lens file to tell me what to do" node. It takes any LATENT-typed direction tensor, flattens it to a vector, and packages it as a QSCOPE_STEER plan with strength, layer spec, normalization and last-token-only controls - everything Feature → Direction gives you, minus the SAE.
You reach for this when your direction comes from somewhere other than the standard pipelines: a residual you captured with Capture Residual, a vector from your own analysis code, a direction you exported from another tool, or just a hand-rolled experiment. It's the general-purpose "steer with this vector" adapter, and it makes the pack's steering machinery usable with whatever direction you can produce.
How it works
The mechanics are the same as every other steer plan: at apply time (inside Generate's context manager, or via Steer CLIP's persistent hooks), the direction is added to the residual stream at the layers your layer_spec names. With normalize on (the default), the direction is unit-normalized and scaled by 0.3 × mean residual norm × strength - the same calibration as Feature → Direction, so a strength of 1 means roughly the same thing here as it does there. The direction's dimension becomes the plan's d_model, which is what downstream nodes check for compatibility.
The inputs that matter
- direction - a
LATENT. This is the flexible part: it can be a captured residual from Capture Residual, or any latent carrying a vector you want to steer with. It gets reshaped to a single flat vector, so don't feed it a batch of unrelated stuff and expect sense. - strength - push factor (default 1.0, −8 to +8; negative steers away).
- layer_spec - which layers to inject at (
all,early,middle,late, or the5,8-12,15:0.5syntax). Defaultmiddle. - normalize - leave on unless you know your direction's scale is already calibrated.
- last_token_only - restrict the injection to the final token.
Outputs: steer (QSCOPE_STEER) and info reporting the direction dim and strength. From there it wires into the same downstream nodes as any other plan.
Installing it
One 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). No SAE download happens here - this node never touches one.
Common issues
The dimension trap is the one to respect: if your direction vector's length doesn't match the target encoder's d_model, the apply-side nodes throw a mismatch error with suggestions. A direction of, say, 4096 won't apply to a 2048-d encoder, no matter how confidently you made it. And remember the flattening: a multi-token captured residual gets flattened into one long vector - for a clean single direction you generally want a short prompt (or your own pooling) on the capture side.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| direction | LATENT | — | |
| strength | FLOAT | 1.00-8–8 | — |
| layer_spec | STRING | middle | — |
| normalize | BOOLEAN | true | — |
| last_token_only | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| steer | QSCOPE_STEER | — |
| info | STRING | — |