Nodes/ComfyUI-CLIPSlider-SC/SliderLatentPooled
ComfyUI Node

SliderLatentPooled

SliderLatentPooled

By chenbaiyujason·Created 2 years ago·Updated 2 years ago· 0
SliderLatentPooled
  • clip
  • positive_formatter
  • negative_formatter
  • mediums
  • subjects
  • latent
  • word_distance
target_wordhappy
opposite_wordsad
iterations30
seed0

SliderLatent finds a concept direction in the per-token embedding space, and it's perfect for SD 1.5 and SDXL. SliderLatentPooled is the same loop aimed at the pooled embedding - and it's the variant you want on FLUX, which is what this pack was actually built to drive.

The mechanism is identical to SliderLatent: pick a random medium and subject each iteration, build a {medium} of a {target_word} {subject} and the same template with the opposite word, encode both, subtract, and average across iterations. The one difference is in the encode call. The non-pooled node keeps the per-token sequence; this one requests return_pooled=True and keeps only the pooled vector. There's a reason baked into the source: on FLUX the encoder returns the T5 sequence (with no pooled output from T5) and the CLIP-L pooled vector (with no sequence from L), so the pooled vector is the practical "prompt summary" to steer. If you're on FLUX or SD3 and you used the non-pooled finder, you were steering the wrong representation.

The pairing

SliderLatentPooled → CLIPSliderApplyPooled. That's the FLUX chain, and it's exactly what the author's own workflow does: SliderLatentPooled feeds CLIPSliderApplyPooled, which feeds a BasicGuider on a flux1-dev-fp8 + Hyper-FLUX 8-step LoRA stack. The non-pooled chain (SliderLatent → CLIPSliderApply) is the SD 1.5/SDXL version. Get them crossed and you get shape errors or quietly broken results.

Inputs and outputs

The socket list is the same as SliderLatent's, so the ones you'll actually set are:

  • target_word / opposite_word - the concept pair, "happy"/"sad" by default. Leave opposite_word empty to find a neutral→target direction; the shipped workflow does exactly that with "scary" against an empty string.
  • iterations - default 30; the shipped workflow runs 20. Each one is a text-encoder pass, cheap on GPU, so don't be shy.
  • seed - a fixed seed makes the random sampling reproducible, so the direction stays stable between runs.

The optional sockets - positive_formatter / negative_formatter from SliderPrompt and mediums / subjects from SliderObjectIn - override the template and the vocabulary pools. Leave them unwired and it uses the built-in defaults. Outputs are latent (the direction, single-vector shaped here) and word_distance (the norm of the average difference, useful for comparing how separable two concepts are in the encoder).

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/chenbaiyujason/ComfyUI-CLIPSlider-SC

Restart, or install via ComfyUI Manager (search "ComfyUI-CLIPSlider-SC"). No model files to download and no heavy dependencies - the listed diffusers requirement is a formality the code never touches.

Troubleshooting

If your FLUX direction comes out weak, check three things in order: is it paired with CLIPSliderApplyPooled (not the plain apply node)? Is iterations high enough that the average isn't noisy (20 is the author's own default)? And did you set a fixed seed so you're not chasing a moving target between runs? Beyond that, remember this is a niche personal fork of RhizoNymph's ComfyUI-CLIPSlider with a stale inherited README - when in doubt, the workflow JSON in the repo is the ground truth for how the author intends the pieces to connect.

Categoryconditioning

Inputs (9)

NameTypeDefaultDescription
clipCLIP
target_wordSTRINGhappy
opposite_wordSTRINGsad
iterationsINT301–18446744073709550000
seedINT00–18446744073709550000
positive_formatteroptPROMPT_FORMATTER
negative_formatteroptPROMPT_FORMATTER
mediumsoptMEDIUMS
subjectsoptSUBJECTS

Outputs (2)

NameTypeDescription
latentLATENT
word_distanceFLOAT