ComfyUI Node
Contextual Repulsion (Diversity)
Increases batch diversity by applying repulsion to text conditioning embeddings. Based on 'On-the-fly Repulsion in the Contextual Space' (SIGGRAPH 2026). Requires batch_size >= 2.
Contextual Repulsion (Diversity)
- model
- MODEL
◄repulsion_scale0.10►
◄timestep_cutoff0.35►
◄gradient_steps3►
Categorymodel_patches
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| repulsion_scale | FLOAT | 0.100–5 | Repulsion strength. 0.1 = shift embeddings by ~10% of their magnitude per gradient step. Start with 0.05-0.2, increase for more diversity. |
| timestep_cutoff | FLOAT | 0.350–1 | Fraction of early denoising steps to apply repulsion. 0.35 = first 35% of steps. |
| gradient_steps | INT | 31–10 | Number of iterative gradient steps per model call. More steps = stronger effect. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |