A ComfyUI custom node that adds seed-dependent noise to the text conditioning to increase output diversity. Port of SeedVarianceEnhancer v2.2 (by ChangeTheConstants, MIT-0) retuned for Krea 2 Turbo (8-step distilled, guidance_scale=0.0, Qwen3-VL 4B text encoder).
If outputs barely change, work through this in order:
-
Set THIS node's
seedtorandomizeorincrement. The noise is keyed to the node's ownseed, not the KSampler seed. If it is leftfixed, every run gets the same embedding noise, so on a low-variance Turbo model the images stay nearly identical. This is the most common cause. -
Confirm the noised conditioning actually reaches the sampler. The official Krea 2 template uses subgraphs and a Prompt Enhancer. Make sure the chain is
CLIPTextEncode -> this node -> KSampler (positive)on the path that really feeds the sampler, not a dead branch. Quick test: setauto_strength_factorto 5-10, ornoise_insert=noise on all stepswithrandomize_percent80, and generate. If the image breaks apart, wiring is correct (just dial back). If it does not change at all, the node is not in the active path. -
Turn on
log_to_consoleand read the numbers. It prints:embedding_std,effective_strength,real_tokens,values_noised, andL2_perturbation(how much the conditioning actually moved). IfL2_perturbationis under ~1%, raiseauto_strength_factor. If it is 30%+ but the image still does not change, the problem is wiring or the fixed-seed issue above, not strength. -
Use a longer prompt / encode the Prompt-Enhancer output. More prompt tokens give the node more values to perturb, which (counter-intuitively) increases diversity. Place this node after the enhancer's CLIPTextEncode.
-
Widen the noise window for 8 steps.
steps_switchover_percent25 covers ~the first 2 of 8 steps; try 35-40 for the first 3 if structure stays locked.
diagnosticsSTRING output — the node now has a second output carrying the same text aslog_to_console(std, effective strength, L2 perturbation, hints). Wire it to a "Show Text" node to see whether the noise is working without reading the console.noise_distribution: uniform / gaussian — gaussian matches the bell-curve statistics of the embedding itself and tends to produce fewer broken outputs at the same strength. Power-matched: the same strength gives the same overall perturbation with either distribution. Default remainsuniform(identical to previous versions).granularity: values / tokens —valuesscatters noise across individual embedding values (original behavior);tokensperturbs whole tokens at once, giving more "semantic" variations where subjects, props, and composition shift together. Withtokens,randomize_percentselects tokens instead of values.
Workflows saved with older versions load unchanged: the new widgets are appended at the end and fall back to their defaults.
auto_strength_factor- noise scale self-calibrates to the measured embedding std (effective_strength = std * factor), so the right strength transfers across text encoders. Z-Image and Krea 2 (Qwen3-VL 4B) have different embedding scales.- Verbose diagnostics in
log_to_console(real-token count, effective strength, % values noised, L2 perturbation) to debug weak/no variation. - RNG isolation - the global torch RNG state is saved and restored around noise generation, so the node never disturbs the sampler's own noise.
- Tolerant padding detection (near-zero rows, not only exact zeros) + a warning when the measured std is near zero.
- Robustness fix -
noise on all stepsno longer errors when the internalSVH_tagkey is absent.
cd ComfyUI/custom_nodes
git clone https://github.com/harukimix/KreaSeedVarianceEnhancer.git
Restart ComfyUI. The node appears as "Seed Variance Enhancer - Krea 2 Turbo"
under advanced/conditioning.
[Prompt] -> [CLIPTextEncode (Qwen3-VL 4B / type=krea2)] -> [Seed Variance Enhancer - Krea 2 Turbo] -> KSampler (positive)
Leave the negative path untouched. Krea 2 Turbo runs with CFG off (guidance_scale=0.0), so only the positive conditioning drives generation - which is exactly what this node modifies.
| Setting | Start with | Notes |
|---|---|---|
seed (this node) |
randomize / increment | Must vary between runs to get different variations. |
auto_strength_factor |
1.0 | 0.5 subtle, 1.0 balanced, 3-5 strong. 0 = use manual strength. |
randomize_percent |
50 | Higher = more diversity, less adherence. |
noise_insert |
noise on beginning steps |
Perturb early structure, recover the prompt after. |
steps_switchover_percent |
25 | At 8 steps: 25 ~ first 2 steps, 38 ~ first 3 steps. |
mask_percent |
0 | Raise (with mask_starts_at) to protect a subject or rendered text. |
log_to_console |
true (while tuning) | Shows the actual perturbation; turn off once dialed in. |
strength |
20 | Only used when auto_strength_factor is 0. |
noise_distribution |
uniform | Try gaussian for gentler, less break-prone variation at the same strength. |
granularity |
values | Try tokens for more semantic variations (whole words shift together). |
- Too much drift -> lower
auto_strength_factor/randomize_percent/steps_switchover_percent. - Not enough variety -> raise
auto_strength_factortoward 3-5, or trynoise on all steps. - Garbled text -> protect part of the prompt with
mask_percent, or lower strength.
Based on SeedVarianceEnhancer v2.2 by ChangeTheConstants, MIT No Attribution License (MIT-0). This adaptation is provided under the same terms.