XFuser KSampler (Advanced)
The workhorse of Raylight sequence parallel
- ray_actors
- positive
- negative
- latent_image
- latent
- ray_actors
If you're running Raylight in its most common mode - sequence parallel, model loaded fully on every GPU, work split across cards - this is the sampler you'll use. XFuser KSampler (Advanced) is the Raylight version of ComfyUI's KSampler (Advanced), with one crucial difference: the actual denoising happens inside the Ray workers, split across your GPUs by xFuser's Ulysses attention. The README's own direction for USP mode is "use the XFuser KSampler and raise the Ulysses degree to your GPU count."
Raylight is Komikndr's multi-GPU pack - "why buy a 5090 when you can buy two 5070s." Sequence parallel splits the sequence dimension (frames, tokens, pixels) across GPUs so each card does a slice of the attention work; every GPU holds the full model. That's the mode for when you have enough combined VRAM and just want speed. This sampler is its engine.
How it works
You feed it the model-carrying RAY_ACTORS from Load Diffusion Model (Ray), plus conditioning and a latent, and it fans the job out to every worker with a common_ksampler remote call, then gathers the results back. Input-wise it mirrors Comfy's KSampler Advanced almost exactly - add_noise, noise_seed, steps, cfg, sampler_name, scheduler, start_at_step, end_at_step, return_with_leftover_noise, denoise - which means if you can drive the native node, you can drive this one. The ray_actors output passes through so you can chain it straight into Distributed VAE (Ray).
The two settings that actually matter in practice:
- noise_seed - single seed, single generation. This is the difference from the Unified sampler, which takes a list of seeds for data-parallel groups. If you're only doing USP (no DP), this is the right tool.
- cfg - remember video models are guidance-distilled for the most part: Wan with speed LoRAs wants CFG 1, and at exactly 1 ComfyUI skips the negative pass entirely, which is a free speed win. The default of 8 is an SDXL-era habit that mostly doesn't apply to Wan/Flux/Hunyuan.
Outputs
Two: latent (the denoised latent, into your Ray VAE decode or preview) and ray_actors (the model chain, passed through). That passthrough is why you can daisy-chain: loader → sampler → decode, with the model always traveling alongside.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
<your_python> -m pip install -r requirements.txt
or ComfyUI Manager → search raylight. The heavy lifting is ray and xfuser; on Nvidia with FSDP + fp8, pin nvidia-nccl-cu12==2.28.9 or expect FP8 communication errors.
Common issues
The classic beginner trap is a sampler that finishes instantly and outputs garbage: that's usually ray_actors wired to the wrong node - the sampler needs the model-carrying chain from the loader, not the RAY_ACTORS_INIT from Ray Init Actor. Second: if your Ulysses degree doesn't multiply out to your worker count (e.g. 3 GPUs but Ulysses 2), xFuser will complain loudly about the parallel config - set Ulysses degree equal to your GPU count for pure USP, or add CFG/DP degrees to fill the gap. And with Ring attention degree above 1 you can hit a known VRAM leak; the author's fix is to bump the Ulysses degree instead.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| 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 | |
| ray_actors | RAY_ACTORS | Ray Actor to submit the model into | |
| 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 | |
| denoise | FLOAT | 1.000–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| ray_actors | RAY_ACTORS | — |