ComfyUI Node
Train Lens (Contrastive)
Train a steering direction from text pairs. Provide N positive and N negative prompts (one per line, equal counts). Outputs a steer plan ready for Steer Conditioning / Steer CLIP.
Train Lens (Contrastive)
- clip
- steer
- report
◄positive_texts►
◄negative_texts►
◄layer-1►
◄steps500►
◄lr0.0100►
◄beta50►
◄strength1.00►
◄save_name►
CategoryQwenScope/Train
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| positive_texts | STRING | Texts that EMBODY the concept (one per line). | |
| negative_texts | STRING | Neutral / opposite texts (same count as positives). | |
| layer | INT | -1-128–127 | Layer to capture residuals at. -1 = last layer (use this if you'll apply via Steer Conditioning). Middle layers (e.g. half of total) work well for Steer CLIP at the same layer. |
| steps | INT | 50050–10000 | — |
| lr | FLOAT | 0.01000.0001–0.1 | — |
| beta | FLOAT | 501–200 | Margin sharpness in the BT loss. Higher = sharper boundary. |
| strength | FLOAT | 1.00-8–8 | — |
| save_nameopt | STRING | If set, also save to lenses/qwenscope/<save_name>.safetensors. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| steer | QSCOPE_STEER | — |
| report | STRING | — |