Data Parallel KSampler (Advanced)
N generations, one run
- ray_actors
- noise_list
- positive
- negative
- latent_image
- latent
- ray_actors
This is the workhorse of Raylight's Data Parallel mode - the thing you drop in where a normal KSampler (Advanced) would go, so that every GPU in the cluster runs the whole sampling job on its own, all at once. If you've got two GPUs and you're tired of queueing the same workflow twice to get two seeds, this node is the point of the pack.
How it works. Data Parallel doesn't shard your model and doesn't split your sequence. Each GPU holds the full model and processes the full sequence independently - you just get N results per run instead of one. That's a different trade than the pack's other modes: USP splits the sequence across GPUs (for fitting a model that won't fit on one card), FSDP shards the weights, and DP here is pure throughput. The README's rule of thumb is worth memorizing: enough VRAM → USP; not enough → FSDP; still not enough → FSDP CPU offload. DP is for when the model fits and you want volume.
The inputs that matter. Most of this will look familiar because it's a mirror of the core KSampler Advanced. The ones that aren't:
ray_actors- the tooltip says it plainly: "Ray Actor to submit the model into." This is the RayInitializer's output chain, and it's required on every Raylight sampler.noise_list- "List of noise seeds for each GPU in data parallel mode." Feed it the output ofDPNoiseList. This is what makes each GPU's run different.positive/negative- plainCONDITIONING. Want different prompts per GPU? WireDPConditioningListin here instead, and it fans out per GPU.
Then the familiar knobs: steps (20), cfg (8), sampler_name (44 choices), scheduler (9 choices), add_noise, start_at_step / end_at_step, return_with_leftover_noise, and denoise (1.0). If you know how to drive the core sampler, you know how to drive this.
Outputs. latent comes back as a list - one latent per GPU - and ray_actors passes through so you can chain another node after it. Decode the latents the way you'd decode a batch.
Where people get burned. The big one: DP mode requires Ulysses and Ring degrees set to 0 in your RayInitializer. The README is explicit - "Both FSDP and DP modes must have the Ulysses and Ring degrees set to 0." If you clone a USP workflow and forget, you get a confusing parallel-group error instead of a clean message. The second gotcha: DP doesn't combine VRAM. Each GPU needs enough for the whole model and the full sequence, so this won't rescue a model that OOMs on one card - that's FSDP's job. And on a 2-GPU box with a noise list that emits 8 seeds, only the first 2 are used; leftover seeds are harmless but don't be surprised.
Install. One pack install covers this node:
ComfyUI Manager → search "raylight" → Install
or:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
Restart ComfyUI. The requirements.txt pulls ray>=2.48.0 and xfuser>=0.4.4 - that xfuser line is the heavyweight distributed-attention engine, and it's a chunky install. FlashAttention is optional now (Sage/Torch/Flash all work, and the README's own benchmark shows them within a few percent of each other). On Windows, expect to live in WSL2. If you're doing FSDP with fp8 models, pip install nvidia-nccl-cu12==2.28.9 and use PyTorch 2.8.1. And the community's honest feedback on the launch threads: the project moves fast, some models are "a bit unstable," and the fix is sometimes just restarting ComfyUI - keep that in your back pocket before you start blaming your hardware.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| add_noise | COMBO | 2 options: enable, disable | |
| 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 | |
| noise_list | NOISE | List of noise seeds for each GPU in data parallel mode | |
| 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 | — |