TSampler Advanced (Latent Control)
Step-precise latent transforms for control freaks
- model
- positive
- negative
- latent_image
- transform_optional
- LATENT
TSampler Advanced (Latent Control) is the same idea as its plain sibling - a sampler with a transform_optional socket that applies step-based latent edits mid-denoise - but built on ComfyUI's KSamplerAdvanced instead of KSampler. The practical difference: you get absolute control over exactly which sampling steps run, in numbers rather than fractions. If you know precisely when you want the transform to land, this is the node for you.
What's different from TSampler
Where TSampler gives you a denoise knob and a seed, TSampler Advanced swaps in the advanced sampler's fields: add_noise (enable/disable), noise_seed, start_at_step, end_at_step, and return_with_leftover_noise (enable/disable). Plus the same model, steps, cfg, sampler_name, scheduler, positive, negative, and latent_image. Output is a LATENT, and the optional transform_optional input is identical - any TRANSFORM from the pack plugs straight in.
This is the one to reach for when you're already thinking in step numbers. The classic pattern: run img2img from start_at_step: 0 to end_at_step: 8, and gate your transform to the same early window, so the edit happens during structure formation and the remaining steps refine it. KSamplerAdvanced is the underlying class, so nothing about how the transform mechanism works changes - it's still applied to the denoised prediction after CFG, within the transform's own start_at/stop_at window.
Two ways to time an edit
Here's where it gets interesting. The transform nodes have their own window (start_at/stop_at, as fractions of total steps), and TSampler Advanced has its own (start_at_step/end_at_step, as absolute numbers). You can use either - or both, if you want a window within a window. A beginner-friendly setup:
- Set the sampler to
start_at_step: 0,end_at_step: 10for a partial denoise. - On the transform, set
start_at: 0,stop_at: 1so it fires for every active step.
That applies your transform to every step of the img2img pass, which is a surprisingly effective way to stamp structure into a regeneration. When you're ready for surgical edits, combine the one-time transform nodes with this sampler: pin the sampler's window around the exact step you want to hit, and you get a very predictable result.
The input that matters
transform_optional is the whole reason this node exists. Same caveat as everywhere in this pack: transform defaults are start_at: 0, stop_at: 0, which means the transform never fires until you raise stop_at. And if end_at_step is left at its default of 10000 while start_at_step is 0, you're running a full denoise - set it deliberately.
Install and notes
Same install as the rest of the pack - ComfyUI Manager, search "Advanced Latent Control", or:
cd ComfyUI/custom_nodes
git clone https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
Restart after cloning. No models to download, no pip dependencies beyond stock ComfyUI.
A word of advice: don't start here. The plain TSampler's denoise slider is friendlier for learning what transforms feel like. Come back to TSampler Advanced when you can say "I want this exactly at step 4 of 12" out loud - that's the workflow this node was built for. And keep in mind that high-order samplers evaluate intermediate sigmas; the pack's callback is designed to fire once per scheduled step, so your start_at_step numbers line up with the sampler's step count, not sub-steps.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_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 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable | |
| transform_optionalopt | TRANSFORM | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |