Nodes/ComfyUI-Differential-Encode/CLIP Text Encode (Differential)
ComfyUI Node

CLIP Text Encode (Differential)

Encodes text with CLIP and injects seed-driven variation to avoid seed collapse on z-image.

By starsFriday·Created 8 months ago·Updated 8 months ago· 1
CLIP Text Encode (Differential)
  • clip
  • CONDITIONING
text
seed0
noise_std0.18
token_dropout0.10
per_token_gain_std0.12
global_offset_std0.08
pooled_noise_std0.05
pooled_global_offset_std0.04
preserve_magnitudetrue
orthogonalize_noisetrue
min_std_scale0.001
Categoryconditioning

Inputs (12)

NameTypeDefaultDescription
textSTRINGPrompt text to encode with seed-dependent perturbations.
clipCLIPCLIP model used for encoding.
seedINT00–9223372036854776000Seed used for the differential noise.
noise_stdFLOAT0.180–1Scale of seed-driven noise added to token embeddings (per-token Gaussian).
token_dropoutoptFLOAT0.100–0.8Chance to zero-out entire token embeddings (seeded) to create variation.
per_token_gain_stdoptFLOAT0.120–1Std of multiplicative gain noise per token (1 + N(0, std)), adds structured jitter.
global_offset_stdoptFLOAT0.080–1Gaussian shift shared by all tokens to steer conditioning per seed.
pooled_noise_stdoptFLOAT0.050–1Noise applied to pooled_output so refiner/backbones also see variation.
pooled_global_offset_stdoptFLOAT0.040–1Global pooled shift; helps video/backbones that rely more on pooled_output.
preserve_magnitudeoptBOOLEANtrueRe-normalize after perturbation to keep overall embedding statistics stable.
orthogonalize_noiseoptBOOLEANtrueProject noise off the original token directions to keep semantics while adding diversity.
min_std_scaleoptFLOAT0.0010–0.1Lower bound for std/mean used to scale noise so low-variance prompts still get variation.

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONINGSeed-sensitive conditioning embedding.