KSampler Sequence (v2)
Sine-modulated denoise and seed keying for prompt progression
- model
- positive_seq
- negative_seq
- latent_image
- LATENT
This is the more elaborate sibling of KSampler Sequence (KSamplerSeq). Same core idea - loop a KSampler across multiple passes, evolving prompt and seed as you go - but v2 trades the v1 node's inline frameIndex:prompt scheduling for separate frame_count/cond_keyframes inputs (matching CLIPTextEncodeSequence2 upstream), and adds a handful of knobs v1 doesn't have: noise injection between loops, sine-modulated denoise, and periodic seed keying.
How it works
The base loop mechanic is the same as v1: denoise_start runs the first pass, denoise_seq covers the rest, seed evolves per seed_mode_seq, and you get the same conditioning-slerp (use_conditioning_slerp/cond_slerp_strength) and latent-interpolation (use_latent_interpolation/latent_interpolation_mode/latent_interp_strength) smoothing options plus unsample_latents for controlled variation.
Where v2 diverges is three added systems, all optional and all off some by default:
Noise injection. inject_noise (default true) adds random noise between loops at noise_strength - a different variation mechanism than unsample_latents, injecting fresh randomness rather than reversing existing steps.
Sine-modulated denoise. denoise_sine (default true) varies the effective denoise over the loop sequence using a sine wave up to denoise_max, instead of holding denoise_seq flat across every loop. The practical effect is a pulsing rhythm to how much each loop changes, rather than a constant nudge.
Seed keying. seed_keying (default true) modulates the seed on a schedule rather than simply incrementing or randomizing it - seed_keying_mode picks sine or modulo, and seed_divisor sets the period. This is for deliberately periodic patterns across the sequence rather than a monotonic drift.
All three default on, which means v2 behaves noticeably differently out of the box than v1 even at matching denoise_seq/seed_mode_seq settings - worth knowing before comparing the two side by side.
The inputs and outputs that matter
model,latent_image- usual sampler inputs.positive_seq/negative_seq(CONDITIONING) - note the type: plainCONDITIONING, notCONDITIONING_SEQ. This node pairs withCLIPTextEncodeSequence2, notCLIPTextEncodeList.frame_count/cond_keyframes(INT) - the schedule metadata thatCLIPTextEncodeSequence2outputs alongside its conditioning; wire all three across from that node, not just the conditioning.denoise_sine/denoise_max- if you want v1's flatter, predictabledenoise_seqbehavior instead, turndenoise_sineoff.inject_noise/noise_strength,seed_keying/seed_keying_mode/seed_divisor- the three extra systems above; all can be disabled individually if you want closer-to-v1 behavior with the rest of v2's wiring.
Single output: LATENT.
How to install it
Via ComfyUI Manager: search "WAS_Extras", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/WAS_Extras
pip install -r WAS_Extras/requirements.txt
Same ksampler_sequence.py file as v1 and both CLIP Text Encode Sequence nodes - the requirements.txt install is needed for all four, whether you clone the repo or copy individual files.
Common issues & troubleshooting
Wired CLIPTextEncodeList's output in and it won't connect. That node outputs CONDITIONING_SEQ, which doesn't match this node's CONDITIONING-typed positive_seq/negative_seq. Use CLIPTextEncodeSequence2 upstream instead.
Only wired the conditioning and left frame_count/cond_keyframes disconnected. Both need to come from CLIPTextEncodeSequence2's matching outputs - this node's schedule awareness depends on them, not just the conditioning tensor.
Results feel wildly different from v1 at "the same" settings. That's the three defaulted-on systems - denoise_sine, inject_noise, and seed_keying are all active out of the box and none of them exist in v1. Turn them off one at a time if you're trying to reproduce v1-like, more predictable behavior.
Output has a visible pulsing or periodic quality you didn't ask for. Check denoise_sine and seed_keying - both introduce genuinely periodic effects by design (a sine wave and a modulo/sine seed schedule respectively). If you want steady, monotonic progression instead, disable both and set denoise_seq directly like v1 does.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| seed | INT | 00–18446744073709550000 | Base seed for the sequence. |
| seed_mode_seq | COMBO | How to evolve the seed each loop. | |
| alternate_values | BOOLEAN | true | Alternate certain parameters every other loop. |
| steps | INT | 201–10000 | Sampler steps per loop. |
| cfg | FLOAT | 8.00–100 | Classifier-free guidance. |
| sampler_name | COMBO | Sampler algorithm. | |
| scheduler | COMBO | Noise schedule. | |
| frame_count | INT | 00–1024 | Total frames to run. If 0, inferred from conditionings. |
| cond_keyframes | INT | 00–1024 | Keyframe indices to advance conditionings (list). |
| positive_seq | CONDITIONING | Positive conditioning list. | |
| negative_seq | CONDITIONING | Negative conditioning list. | |
| use_conditioning_slerp | BOOLEAN | false | Interpolate between consecutive conditionings using slerp. |
| cond_slerp_strength | FLOAT | 0.5000–1 | Interpolation amount for slerp. |
| latent_image | LATENT | Initial latent input. | |
| use_latent_interpolation | BOOLEAN | false | Blend/slerp/cosine between consecutive outputs. |
| latent_interpolation_mode | COMBO | Method for latent interpolation. | |
| latent_interp_strength | FLOAT | 0.5000–1 | Interpolation weight for latents. |
| denoise_start | FLOAT | 1.000–1 | Denoise for the first loop (1.0 = full). |
| denoise_seq | FLOAT | 0.500–1 | Denoise for subsequent loops. |
| unsample_latents | BOOLEAN | false | Reverse a few steps before resampling to add variation. |
| inject_noise | BOOLEAN | true | Add random noise between loops for variety. |
| noise_strength | FLOAT | 0.1000.001–1 | Magnitude of injected noise. |
| denoise_sine | BOOLEAN | true | Vary denoise over loops using a sine wave. |
| denoise_max | FLOAT | 0.9000–1 | Max denoise when sine modulation is enabled. |
| seed_keying | BOOLEAN | true | Modulate seed by a schedule to create patterns. |
| seed_keying_mode | COMBO | Mode for seed modulation. | |
| seed_divisor | INT | 42–1024 | Period or divisor for seed/keyframe modulation. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |