ComfyUI Node

Shift transform

Slide the latent sideways, mid-sampling

By kuschanow·Created 2 years ago·Updated 14 days ago· 23
Shift transform
  • offset_optional
  • TRANSFORM
start_at0.00
stop_at0.00
modereplace
x_shift0.00
y_shift0.00

Shift transform is the pack's "nudge the latent around" node, and it's the one most people learn the transform system on. It shifts the denoised prediction along the x and y axes during sampling - the same torch.roll trick the standalone Latent shift node does to a finished latent, but applied per step, in the middle of the denoise. That distinction is the whole game.

What it does

Like every transform node in this pack, it outputs a TRANSFORM object - you don't get an image, you get an instruction that a sampler (TSampler, TSampler Advanced, or any sampler fed by Transform Hijack) executes. Its inputs:

  • x_shift / y_shift - fractions between -1 and 1 of the latent's width/height to roll. Positive shifts one way, negative the other, and values wrap around the edges (it's a roll, not a crop - content that exits one side re-enters the other).
  • start_at / stop_at - the step window as fractions of total steps. The transform only fires inside this window.
  • mode - replace outright shifts the prediction; combine averages the shifted and original latent ((shifted + original) / 2), which produces a much softer double-exposure feel.
  • offset_optional - plug an OFFSET here to fire on a repeating step pattern instead of continuously.

Why you'd use it

Shifting x0 mid-sampling is how you get "the image looks like it's sliding while it's being drawn." Done in the early steps it repositions composition; done later it drags detail. The wrap-around roll also makes it a shortcut for tiling experiments - shift by half the width and the seams line up, which pairs naturally with mirror transforms for seamless tileable output.

The honest caveat: a per-step shift on every step compounds. Shift by 0.1 for a whole 20-step run and by step 20 the content has traveled two full image widths, which looks like a smear unless you wanted that. That's exactly why the start_at/stop_at window and offsets exist - use them. Shift during the first 15% of steps only, and you get a gentle composition slide instead of a blur.

The one thing beginners get wrong

Default start_at: 0 and stop_at: 0 means the transform never fires. Raise stop_at above start_at or nothing happens - this is the single most common "it doesn't work" report across the whole pack. Also, combine mode with small shifts is nearly invisible on its own; it's meant to be layered.

Install

Same repo, same routine as the rest of Advanced Latent Control:

cd ComfyUI/custom_nodes
git clone https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control

Restart, and "Shift transform" appears under sampling/transforms. ComfyUI Manager users can search "Advanced Latent Control" instead. No models, no extra dependencies.

Where it fits

Start with a small shift (0.05–0.1), start_at: 0, stop_at: 0.15, combine mode, and compare against the unshifted workflow. If you want the shift to hit only every few steps, add a Transform offset to offset_optional. And if you don't need the mid-sampling behavior at all - you just want to slide a finished latent around - the pack's plain Latent shift node is the simpler tool for that job.

Categorysampling/transforms

Inputs (6)

NameTypeDefaultDescription
start_atFLOAT0.000–1
stop_atFLOAT0.000–1
modeCOMBOreplace2 options: replace, combine
x_shiftFLOAT0.00-1–1
y_shiftFLOAT0.00-1–1
offset_optionaloptOFFSET

Outputs (1)

NameTypeDescription
TRANSFORMTRANSFORM