Nodes/ComfyUI_TJS/TJS Advanced Sampler (KSampler Advanced + Endpoint)
ComfyUI Node

TJS Advanced Sampler (KSampler Advanced + Endpoint)

KSampler Advanced that bails out early

By hdfhssg·Created 2 months ago·Updated 2 months ago· 23
TJS Advanced Sampler (KSampler Advanced + Endpoint)
  • model
  • positive
  • negative
  • latent_image
  • latent_x0
  • latent_xt
  • k_star
  • nfe_used
  • nfe_saving_pct
  • sigma_at_exit
add_noise
noise_seed0
steps30
early_exit_gamma0.60
cfg8.0
sampler_name
scheduler
start_at_step0
model_typeauto

TJS Advanced Sampler is the KSampler Advanced version of Truncated Jump Sampling: same early-exit trick as the pack's plain TJSSampler, but wrapped in the controls you'd expect from ComfyUI's "advanced" sampler - add_noise, noise_seed, and start_at_step. If you already run KSampler Advanced and you want to test TJS without rebuilding your img2img or multi-stage graph, this is the node that fits.

Why this one instead of TJSSampler

The plain TJS node is a one-shot text-to-image replacement - seed, CFG, sampler, go. This one adds three things:

  • add_noise - enable for text-to-image (fresh noise on an empty latent), disable for img2img where you're denoising an existing latent and don't want it scrambled first.
  • noise_seed - the advanced sampler's own seed field, separate from anything upstream.
  • start_at_step - for multi-stage workflows that begin mid-trajectory (say, a refine pass that kicks off at step 10 of a 30-step schedule).

So the honest pitch is: you've got an existing KSampler Advanced workflow, you swap the node, dial early_exit_gamma to 0.6, and you're testing TJS in two minutes without restructuring anything. That's the whole appeal.

How it works

Same core as the rest of the pack. k* = ceil(gamma * steps). The node computes the full sigma schedule exactly the way KSampler Advanced would, runs the sampler from your start_at_step down to sigma[k*], then appends a 0 to the schedule so the final step decodes the model's endpoint prediction (denoised / x0) in the same call. A k-diffusion callback captures both that endpoint and the raw exit state in a single pass - no second sampler invocation, which is what would've eaten your speed win. At gamma = 1.0 it takes a full-schedule fast path and behaves like the stock node.

One trap the source guards against: if your start_at_step is already past k*, there's nothing to run, so the node prints a warning and resets you to step 0. Keep start_at_step comfortably below your gamma-scaled exit point.

Inputs and outputs

The wiring is standard: model, positive / negative, latent_image, cfg, sampler_name, scheduler, and model_type (auto / diffusion / flow, an informational flag - auto is fine). The one new dial is early_exit_gamma (default 0.6, 0.05–1.0), and steps is your full budget K.

Outputs are the pack-wide six: latent_x0 (the endpoint prediction - this is what you VAE-decode), latent_xt (the noisy exit latent), and the diagnostics k_star, nfe_used, nfe_saving_pct, sigma_at_exit. With steps=30, gamma=0.6 you get k*=18, 19 NFE, ~37% saved - the README's worked example.

Install

No dependencies beyond ComfyUI itself, no model files. ComfyUI Manager search "ComfyUI_TJS", or:

cd ComfyUI/custom_nodes
git clone https://github.com/hdfhssg/ComfyUI_TJS

Restart ComfyUI and the four TJS nodes appear under sampling/TJS.

Caveats

This pack is brand-new (July 2026 commits) with zero community footprint - no Reddit threads, no shared workflows to crib settings from. The README's tested list (SDXL, SD3.5M, Z-Image-Turbo, Anima, Krea2, LTX-2B, FLUX.2-Klein FP8, Qwen-Image-Edit) covers the modern flow-matching landscape well, but you're on your own tuning gamma per model. Start at 0.6, compare against your stock KSampler Advanced output, and remember that low gamma buys speed at the cost of detail the endpoint prediction can't fully restore. Also note the paper the README cites is dated 2026 - fresh enough that "vetted" isn't the word anyone should use yet.

Categorysampling/TJS

Inputs (13)

NameTypeDefaultDescription
modelMODEL
add_noiseCOMBO2 options: enable, disable
noise_seedINT00–18446744073709550000
stepsINT301–10000
early_exit_gammaFLOAT0.600.05–1
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
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
start_at_stepINT00–10000
model_typeCOMBOauto3 options: auto, diffusion, flow

Outputs (6)

NameTypeDescription
latent_x0LATENT
latent_xtLATENT
k_starINT
nfe_usedINT
nfe_saving_pctFLOAT
sigma_at_exitFLOAT