Nodes/ComfyUI Latent Transform Sampler/Latent Transform Sampler πŸ”„ (Legacy)
ComfyUI Node

Latent Transform Sampler πŸ”„ (Legacy)

Same node, older name β€” the legacy alias you don't need to fear

By pizurnyΒ·Created 11 months agoΒ·Updated 10 months agoΒ· 3
Latent Transform Sampler πŸ”„ (Legacy)
  • model
  • positive
  • negative
  • latent_image
  • samples
β—„seed0β–Ί
β—„steps20β–Ί
β—„cfg8.0β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„denoise1.00β–Ί
β—„transform_count3β–Ί
β—„transform_typeshiftβ–Ί
β—„distributionmanualβ–Ί
β—„shift_pixels_x128β–Ί
β—„shift_pixels_y0β–Ί
β—„min_spacing2β–Ί
β—„transform_strength1.0β–Ί
β—„accumulate_shiftsfalseβ–Ί
β—„reverse_on_second_halffalseβ–Ί
β—„transform_sequenceshift,mirror_h,rotate_90_cwβ–Ί
β—„manual_steps3,6,9β–Ί
β—„debug_modetrueβ–Ί

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.

Categorysampling/transform

Inputs (22)

NameTypeDefaultDescription
modelMODELβ€”
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
latent_imageLATENTβ€”
seedINT00–18446744073709550000β€”
stepsINT201–10000β€”
cfgFLOAT8.00–100β€”
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT1.000–1β€”
transform_countINT30–20Number of transformations to apply (0 = disabled)
transform_typeCOMBOshiftType of transformation to apply
distributionCOMBOmanualHow to distribute transforms across steps
shift_pixels_xINT128-512–512Horizontal shift in pixels (for shift transform)
shift_pixels_yINT0-512–512Vertical shift in pixels (for shift transform)
min_spacingINT21–10Minimum steps between transforms
transform_strengthFLOAT1.00–1Strength of transformation (for gradual effects)
accumulate_shiftsBOOLEANfalseWhether shifts should accumulate or reset each time
reverse_on_second_halfBOOLEANfalseReverse transformations in the second half
transform_sequenceoptSTRINGshift,mirror_h,rotate_90_cwComma-separated sequence (if type='sequence')
manual_stepsoptSTRING3,6,9Comma-separated step numbers (if distribution='manual')
debug_modeoptBOOLEANtruePrint debug information to console

Outputs (1)

NameTypeDescription
samplesLATENTβ€”