Nodes/ComfyUI-ContextualRepulsion/Contextual Repulsion (Diversity)
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.

By Hyun-Puer·Created 4 months ago·Updated 4 months ago· 0
Contextual Repulsion (Diversity)
  • model
  • MODEL
repulsion_scale0.10
timestep_cutoff0.35
gradient_steps3
Categorymodel_patches

Inputs (4)

NameTypeDefaultDescription
modelMODEL
repulsion_scaleFLOAT0.100–5Repulsion strength. 0.1 = shift embeddings by ~10% of their magnitude per gradient step. Start with 0.05-0.2, increase for more diversity.
timestep_cutoffFLOAT0.350–1Fraction of early denoising steps to apply repulsion. 0.35 = first 35% of steps.
gradient_stepsINT31–10Number of iterative gradient steps per model call. More steps = stronger effect.

Outputs (1)

NameTypeDescription
MODELMODEL