Latent shift
Slide a latent around without touching pixels
- latent
- vae_optional
- LATENT
Latent shift is the direct-manipulation node from the Advanced Latent Control pack: it takes a LATENT, slides it along the x and y axes, and hands back a shifted LATENT. No samplers involved, no TRANSFORM objects, no step windows - just move the latent and carry on. It's the simplest node in the pack, and it pairs with things you already know.
The inputs
latent- what you're shifting.x_shift/y_shift- fractions of the latent's width/height to slide, -1 to 1. Positive shifts one way, negative the other, and it wraps (atorch.roll, not a crop), so content leaving one edge re-enters on the opposite side.
There's also an optional vae_optional input: plug a VAE in and the node will show you a preview of the shifted result in the UI - handy, since you otherwise can't see what you did until you decode.
What it's for
The most useful, real-world pattern here is shifting before a second pass: shift the latent, then feed it into a sampler with low denoise, and you've effectively panned/recomposed the image while the sampler re-draws the wrapped edge into something coherent. It's a poor man's outpainting - the seam gets filled by the model instead of staying a visible hard edge. It's also the standard trick in symmetry workflows: people shift a latent toward the axis of symmetry, mirror it, and let the sampler blend the halves (the pack's own mirror node pairs naturally with this).
There's a documented community example of exactly this being the go-to answer for "how do I create a mirrored/symmetrical shot like a ship's wake": shift the latent along the symmetry axis, then mirror, then sample. That's Latent shift's real job - positioning latent content for the next stage, not being a finished effect itself.
The catch
Because it operates on a finished latent outside sampling, a shift leaves a wrapped seam that no later step will fix on its own - whatever you do next has to heal it. That's why the transform-system version (Shift transform, applied mid-sampling) often looks cleaner for composition work: the sampler rebuilds the seam as it refines. Latent shift is the right tool when you want a straightforward positional move and plan to let the next sampling pass handle the healing.
Install
Same pack as everything here:
cd ComfyUI/custom_nodes
git clone https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
Restart, or search "Advanced Latent Control" in ComfyUI Manager. No models, no dependencies.
The quick start
Drop it between an Empty Latent/VAE Encode and a KSampler, set x_shift: 0.5 with a low-denoise pass after it, and watch the seam get painted over. Or, for the symmetry workflow: Latent shift → Latent mirror → sampler. Two nodes, one repo, and you've got a genuinely new tool in your kit for the cost of a clone.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| x_shift | FLOAT | 0.00-1–1 | — |
| y_shift | FLOAT | 0.00-1–1 | — |
| vae_optionalopt | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |