Nodes/raylight/Data Parallel SamplerCustom
ComfyUI Node

Data Parallel SamplerCustom

Your sampler, your sigmas, N GPUs

By komikndr·Created about a year ago·Updated 2 days ago· 409
Data Parallel SamplerCustom
  • ray_actors
  • noise_list
  • positive
  • negative
  • sampler
  • sigmas
  • latent_image
  • latent
  • ray_actors
add_noisetrue
cfg8.0

The DPKSamplerAdvanced is the friendly all-in-one sampler. DPSamplerCustom is what you reach for when the dropdown doesn't have what you want - it's the Data Parallel mirror of ComfyUI's core SamplerCustom, which means you bring your own sampler and your own sigmas instead of picking from a menu. In exchange, you get the whole custom-sampling toolkit: scheduler curves that aren't in the default list, samplers that only exist as custom nodes, and precise control over the noise schedule.

How it works. Data Parallel means each GPU runs the full sequence on its own with its own seed from the noise_list, so the output is N latents per run. What makes this sampler different from DPKSamplerAdvanced is the inputs: instead of sampler_name and scheduler enums, it takes a SAMPLER object and a SIGMAS schedule from other nodes. That's the core ComfyUI custom-sampling contract, just lifted onto the Ray cluster.

The inputs that matter. The required set is a mix of the familiar and the Ray-specific:

  • ray_actors - the initializer's output chain, required everywhere in this pack.
  • noise_list - the DPNoiseList output, one seed per GPU.
  • sampler - a SAMPLER object from a sampler-selector node (same family you'd use in core custom sampling).
  • sigmas - the SIGMAS schedule. The natural pairing is RayBasicScheduler or RayBetaSamplingScheduler, since they live in the same pack and hand you cluster-native sigmas, though any SIGMAS source will do.
  • cfg, positive, negative - the classic CFG triad, set directly on this node (unlike the Advanced variant, which uses a guider object instead).
  • latent_image - your starting latent, or a DPLatentList output for per-GPU starts.
  • add_noise - boolean, default true; flip it off for img2img-style runs where you're feeding a partially-denoised latent.

Outputs. latent comes back as a list (one per GPU) and ray_actors passes through for chaining.

Where people get confused. The split between this node and DPSamplerCustomAdvanced - this one keeps cfg/positive/negative as plain inputs, the Advanced one swaps them for a RAY_GUIDER object. If your workflow uses the Ray guider nodes (RayCFGGuider, RayBasicGuider), you want Advanced. If you just want cfg and a schedule with less wiring, this is the one. The other trap is assuming the sigmas you feed it are GPU-aware - they don't need to be; each worker consumes the same schedule, and only the seeds differ.

DP mode still requires Ulysses and Ring degrees at 0 in the RayInitializer, and every GPU needs the full model in VRAM. This is a throughput tool, not a model-fitting tool.

Install. One pack install covers it:

cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt

or ComfyUI Manager → search "raylight" → Install, restart, done. The xfuser dependency is the big install, FlashAttention is optional, and Windows realistically means WSL2.

If you already understand core SamplerCustom, you understand this node - the only new vocabulary is ray_actors, noise_list, and the fact that your latent comes back as a list. The README's model-support tables are worth a glance before you commit: DP/FSDP support varies by model, and it's faster to check than to debug.

CategoryRaylight/extra/custom_sampling/samplers

Inputs (9)

NameTypeDefaultDescription
ray_actorsRAY_ACTORS
add_noiseBOOLEANtrue
noise_listNOISE
cfgFLOAT8.00–100
positiveCONDITIONING
negativeCONDITIONING
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT

Outputs (2)

NameTypeDescription
latentLATENT
ray_actorsRAY_ACTORS