Transform offset
Fire a latent transform only on every Nth step
- OFFSET
Transform offset is a small node with a big effect on how transforms feel: it gates a transform so it only fires on a repeating pattern of steps instead of every step. In the Advanced Latent Control pack, every full transform node (Shift, Mirror, Multiply, Latent add, Latent interpolate) has an optional offset_optional input, and this node is what you plug into it.
What it does
It outputs an OFFSET - a repeating on/off pattern across the sampling steps. Three inputs control the pattern:
process_every- the period. Every Nth step gets gated on.offset- shifts where the pattern starts. An integer, and it wraps around the period, so withprocess_every: 4an offset of 2 is the same as -2.mode-process_everygates steps divisible by the period (pattern0 0 0 1for period 4);skip_everyinverts it (pattern1 1 1 0).
The author's own example is the clearest: with process_every: 4, offset: 0, the transform fires on the pattern 0 0 0 1 - only every fourth step, and it repeats. Change offset to 2 and the pattern slides to 0 1 0 0.
Why you'd bother
Because a transform that fires every step can overdo it fast. If you multiply the latent by 1.5 at every step of a 20-step run, you're compounding that 1.5 over and over - the result is a blown-out mess. Gated to every 4th step, the same multiplier nudges the trajectory periodically and the sampler has room to recover between hits. That's the whole trick behind the strobe-like "latent flicker" and rhythmic pattern effects people get from this pack: the offset turns a blunt instrument into a pulse.
The other big use is alternating. Combine a process_every offset on one transform and a skip_every offset on another (via Combine offsets), and you get two transforms taking turns - mirror on the 4th step, multiply on the others. One node toggling between behaviors you'd otherwise need two separate samplers to express.
Wiring it up
Transform offset → (OFFSET) → offset_optional on Multiply transform → (TRANSFORM) → TSampler
That's the whole graph. The OFFSET type only connects to the transforms' offset_optional inputs, and it plays well with the one-time nodes' absence - one-time transforms don't take offsets, because they already fire exactly once.
Install
One more node from the same repo, so the install is identical:
cd ComfyUI/custom_nodes
git clone https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
Restart after cloning, or grab "Advanced Latent Control" via ComfyUI Manager. No dependencies, no model downloads.
Gotchas
offsetis applied modulo the period internally (offset % process_every), so huge values just wrap. Don't panic if you type 50 and it behaves like 2.- An offset node on its own does nothing - it only matters once wired into a transform's
offset_optional. - Keep
process_everysane relative to your step count. A period of 6 on a 10-step run gives you only one active step; that's probably not what you wanted.
Start with process_every: 3 on a multiply transform and listen to how the output changes vs. no offset. It's the fastest way to learn what this node actually contributes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| process_every | INT | 11–10000 | — |
| offset | INT | 0-10000–10000 | — |
| mode | COMBO | 2 options: process_every, skip_every |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OFFSET | OFFSET | — |