Nodes/ComfyUI/TSR - Temporal Score Rescaling
ComfyUI Node Runs on cloud

TSR - Temporal Score Rescaling

One knob for diversity, one for when it kicks in

By Comfy-Org·Created 4 years ago·Updated 35 minutes ago· 129,939
TSR - Temporal Score Rescaling
  • model
  • patched_model
tsr_k0.950
tsr_sigma1.000

TSR - Temporal Score Rescaling - is the node to reach for when your generations are technically fine but boringly similar. It's a post-CFG patch that rescales the model's score during sampling to steer how much diversity the output has, based on the method in the paper Temporal Score Rescaling (arXiv 2510.01184). The tooltip sums up the trade: lower tsr_k produces more detailed results, higher tsr_k produces smoother ones, and tsr_k = 1 disables it entirely.

The "temporal" in the name comes from the paper's video-generation framing, but the node applies to any model - its description explicitly says "image generation," and the mechanism is step-based, not frame-based. It's a recent, experimental addition to ComfyUI core (comfy_extras/nodes_eps.py, alongside Epsilon Scaling), so you'll mostly meet it in tinkering threads and advanced workflows rather than templates.

How it works

CFG computes uncond + scale * (cond - uncond), and the size of that guided jump is what determines how "energetic" the sample is. TSR rescales that jump based on the current signal-to-noise ratio. The math, from equation (6) of the paper: at each step it computes the SNR, then a rescaling factor r = (snr * variance + 1) / (snr * variance / k + 1), and blends the denoised prediction toward it. When SNR is huge (clean, late steps) the factor converges to tsr_k itself.

tsr_k sets how far from neutral the rescaling sits, and tsr_sigma controls the timing - larger values make rescaling take effect earlier in denoising. The result: the model's score is nudged toward more or less "risk," which reads as more fine detail vs. smoother, more conservative output. It's a subtle lever, one step removed from the sampler's own randomness.

Inputs and what to set

  • model - the model to patch.
  • tsr_k - float, default 0.95, range 0.01-100. Below 1 (like the default) boosts detail; above 1 smooths; exactly 1 is a bypass. Small moves - 0.9 to 1.05 - are the realistic territory.
  • tsr_sigma - float, default 1.0. Larger values shift the rescaling earlier in the schedule. If the effect feels like it's only visible at the end, raise it.

Output is the patched MODEL. No model files - this ships inside ComfyUI and does its work in math.

Common issues & troubleshooting

It's easy to overdo. Cranking tsr_k far from 1 in search of "more detail" is how you get grain that reads as noise. The paper's whole point is a gentle steer; treat 0.85-1.1 as the realistic range and A/B against tsr_k = 1.

It's a post-CFG function - respect the stacking rules. Like Epsilon Scaling, it hooks the same sampler stage. Run it with other post-CFG patches and they compound; usually you want one diversity/rescaling patch, not three.

"Temporal" doesn't mean video-only. Don't skip it because you're doing stills. The mechanism is agnostic; the video framing is just where the paper came from.

Categorymodel/patch/unet

Inputs (3)

NameTypeDefaultDescription
modelMODEL
tsr_kFLOAT0.9500.01–100Controls the rescaling strength. Lower k produces more detailed results; higher k produces smoother results in image generation. Setting k = 1 disables rescaling.
tsr_sigmaFLOAT1.0000.01–100Controls how early rescaling takes effect. Larger values take effect earlier.

Outputs (1)

NameTypeDescription
patched_modelMODEL