TSR - Temporal Score Rescaling (Ray)
TSR for Raylight
- ray_actors
- ray_actors
If you've ever rendered a 33-frame Wan clip and watched it get over-saturated, blown out, or just "louder" than the first frames you previewed, this is the node you didn't know you wanted. TSR - Temporal Score Rescaling - is a post-CFG correction that stops long video generations from drifting into oversaturation, and this is Raylight's implementation of it for the multi-GPU workflow.
Raylight is Komikndr's "why buy a 5090 when two 5070s" pack: it runs one diffusion model across several GPUs via Ray workers, using USP (sequence parallelism through XDiT's Ulysses attention) to split the work and FSDP to split the weights. This node lives in the Raylight/extra/guidance section, and it's a patch, not a sampler - you splice it into the model chain between the loader and your Ray sampler.
What it actually does
At low signal-to-noise steps, video models have a habit of cranking the contrast and color until the output looks like a badly compressed HDR meme. TSR rescales the denoised prediction based on the current SNR so low-SNR steps get damped instead of amplified. The formula it applies is the one from the LTX-2 lineage: a rescaling factor of (snr * sigma² + 1) / (snr * sigma² / k + 1), interpolated back toward the original latent via torch.lerp. When tsr_k is 1 or sigma is 0, it's a pure pass-through - which is handy, because it means you can leave the node in your workflow and turn it off by setting tsr_k to 1 rather than deleting wires.
The inputs that matter
There are only three, and you'll realistically touch two of them:
- ray_actors - the model chain. Feed it the
RAY_ACTORSoutput from your Load Diffusion Model (Ray), and pass its output into your sampler. This is how the patch gets applied inside every Ray worker. - tsr_k (default 0.95) - how strongly low-SNR steps are damped. 1.0 disables the effect. Drop toward 0.9 if your clips still come out blown out; it's a subtle dial, so don't expect night-and-day from 0.95 to 0.94.
- tsr_sigma (default 1) - the variance term in the SNR calculation. Leave it at 1 unless you understand what you're changing.
Getting it installed
Same install as the rest of the pack - ComfyUI Manager, search raylight, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
<your_python> -m pip install -r requirements.txt
That pulls ray, xfuser, kernels, huggingface_hub, and hf_transfer. On Nvidia, if you're using FSDP with fp8 models, also pip install nvidia-nccl-cu12==2.28.9. FlashAttention is no longer required - SageAttention and the built-in torch backend both work.
Where people get burned
The classic mistake is wiring the node in the wrong place. This is a chain node: it has to sit between the model loader and the sampler, because it clones the model and registers a post-CFG callback on it. If you hang it off the side or feed it the wrong RAY_ACTORS, you get a graph that technically executes and does nothing. And remember it only matters at low SNR - if your video isn't oversaturating in the first place, TSR will quietly change almost nothing, and that's correct behavior, not a broken install.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | — | |
| tsr_k | FLOAT | 0.9500.01–100 | — |
| tsr_sigma | FLOAT | 1.0000.01–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ray_actors | RAY_ACTORS | — |