Latent Transform Sampler π (Legacy)
Same node, older name β the legacy alias you don't need to fear
- model
- positive
- negative
- latent_image
- samples
It's not a different node
NTransformSampler - shown in ComfyUI as "Latent Transform Sampler π (Legacy)" - is not a separate implementation. Open the pack's source and the registration table maps both class names to the very same class:
NODE_CLASS_MAPPINGS = {
"LatentTransformSampler": LatentTransformSampler,
"NTransformSampler": LatentTransformSampler, # Backward compatibility
}
The "(Legacy)" label is the giveaway. This alias exists so workflows saved under the old class name keep loading after the rename, and it's the only thing the legacy version adds. Identical inputs, identical behavior, identical output. If you see it in an old workflow, you can leave it alone or swap in the current node - you get the same image either way.
What it does, briefly
It's a KSampler replacement that applies a geometric transform - shift, mirror, or rotation - to the latent a few times mid-denoise and lets the model redraw around the change. The full explanation lives on the LatentTransformSampler page, and everything there applies here unchanged, because this node is literally the same code path. transform_count, transform_type, distribution, shift_pixels_x/shift_pixels_y, manual_steps and transform_sequence all behave exactly as described there, and it outputs a single samples (LATENT) for VAE Decode. Yes, debug_mode defaults to on here too, so expect the schedule printed to your console on first run.
Install
One pack installs both names:
cd ComfyUI/custom_nodes
git clone https://github.com/pizurny/Comfyui-Latent-Transform-Sampler
Restart ComfyUI and both nodes appear under sampling/transform. No models to download and no extra dependencies beyond torch and numpy, which ComfyUI already ships. ComfyUI Manager finds the pack as "Latent Transform Sampler" if you prefer that route.
Which one should you use?
The current one. The legacy name exists purely for backward compatibility, and new workflows are better off using LatentTransformSampler so you're not dragging an alias around. If an old workflow you love still references NTransformSampler, there's zero urgency to change it - but the next time you rebuild or share that workflow, the current node is the clean choice. The gotchas are shared too: manual step lists get truncated by transform_count, random modes ignore your seed, and shifts wrap across the latent's edges.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| latent_image | LATENT | β | |
| seed | INT | 00β18446744073709550000 | β |
| steps | INT | 201β10000 | β |
| cfg | FLOAT | 8.00β100 | β |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| denoise | FLOAT | 1.000β1 | β |
| transform_count | INT | 30β20 | Number of transformations to apply (0 = disabled) |
| transform_type | COMBO | shift | Type of transformation to apply |
| distribution | COMBO | manual | How to distribute transforms across steps |
| shift_pixels_x | INT | 128-512β512 | Horizontal shift in pixels (for shift transform) |
| shift_pixels_y | INT | 0-512β512 | Vertical shift in pixels (for shift transform) |
| min_spacing | INT | 21β10 | Minimum steps between transforms |
| transform_strength | FLOAT | 1.00β1 | Strength of transformation (for gradual effects) |
| accumulate_shifts | BOOLEAN | false | Whether shifts should accumulate or reset each time |
| reverse_on_second_half | BOOLEAN | false | Reverse transformations in the second half |
| transform_sequenceopt | STRING | shift,mirror_h,rotate_90_cw | Comma-separated sequence (if type='sequence') |
| manual_stepsopt | STRING | 3,6,9 | Comma-separated step numbers (if distribution='manual') |
| debug_modeopt | BOOLEAN | true | Print debug information to console |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | β |