Nodes/ComfyUI_TJS/TJS Custom (SamplerCustom + Endpoint)
ComfyUI Node

TJS Custom (SamplerCustom + Endpoint)

SamplerCustom, but it quits early and jumps to the endpoint

By hdfhssg·Created 2 months ago·Updated 2 months ago· 23
TJS Custom (SamplerCustom + Endpoint)
  • model
  • positive
  • negative
  • sampler
  • sigmas
  • latent_image
  • latent_x0
  • latent_xt
  • k_star
  • nfe_used
  • nfe_saving_pct
  • sigma_at_exit
add_noisetrue
noise_seed0
cfg8.0
early_exit_gamma0.60

TJSCustom is the SamplerCustom clone in the hdfhssg/ComfyUI_TJS pack: same inputs as ComfyUI's built-in custom sampler node, plus one extra dial, early_exit_gamma, that turns on Truncated Jump Sampling. If you already build sampler graphs with BasicScheduler + KSamplerSelect instead of the monolithic KSampler, this is the least-friction way to test TJS in that world.

Where it sits in the graph

A "custom sampler" graph feeds it objects instead of raw settings. You wire in:

  • sampler - a sampler object from KSamplerSelect
  • sigmas - the schedule from BasicScheduler (that's where your step count actually lives)
  • model, positive, negative, cfg - the conditioning and guidance, just like any sampler
  • add_noise (a boolean - unchecked means no fresh noise, i.e. img2img) and noise_seed
  • early_exit_gamma - the new knob, default 0.6

Then latent_x0 goes to VAE Decode. The pack's README makes the node-choice explicit: TJSCustom takes model / cfg / conditioning directly and builds the CFG guider internally, so it's the simpler of the two custom variants. The other one, TJSCustomAdvanced, makes you wire the guider and noise objects by hand for more control.

How it works

Same TJS core as the rest of the pack, spelled out for the sigma-object world: k* = ceil(gamma * (len(sigmas) - 1)). The node truncates your schedule at sigma[k*], appends a 0, and lets the sampler's final step decode the model's endpoint prediction (denoised / x0) in the same call - a k-diffusion callback captures both the endpoint latent and the exit state, so there's no second sampler invocation to eat your savings. At gamma = 1.0 (or if k* lands on the last step) it just runs the full schedule, equivalent to stock SamplerCustom.

Outputs

The pack-wide six: latent_x0 (endpoint-decoded - the one you use), latent_xt (the noisy latent at the exit point), plus k_star, nfe_used, nfe_saving_pct, and sigma_at_exit for checking what actually ran. With a 30-sigma schedule at gamma=0.6 you get k*=18, 19 NFE, roughly 37% saved.

Install and reality check

No dependencies or model files - Manager search "ComfyUI_TJS", or:

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

Restart and you're done. Now the honest part: this pack is days-to-weeks old, with zero community footprint - no Reddit threads, no shared workflows. The README's tested models (SDXL, SD3.5M, Z-Image-Turbo, Anima, Krea2, LTX-2B, FLUX.2-Klein, Qwen-Image-Edit) suggest it behaves across diffusion and flow-matching wrappers, but you're an early adopter by definition. Start at gamma=0.6, A/B it against stock SamplerCustom on the same seed, and don't go below ~0.4 without expecting visible quality loss. The endpoint trick is real and the implementation is lean; the tuning is on you.

Categorysampling/TJS

Inputs (10)

NameTypeDefaultDescription
modelMODEL
add_noiseBOOLEANtrueWhether to add noise to the latent.
noise_seedINT00–18446744073709550000
cfgFLOAT8.00–100
positiveCONDITIONING
negativeCONDITIONING
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT
early_exit_gammaFLOAT0.600.05–1TJS early-exit ratio. k* = ceil(gamma * steps).

Outputs (6)

NameTypeDescription
latent_x0LATENT
latent_xtLATENT
k_starINT
nfe_usedINT
nfe_saving_pctFLOAT
sigma_at_exitFLOAT