Load Diffusion Model (Ray)
Where every Raylight workflow starts
- ray_actors_init
- lora
- ray_actors
This is the node you'll wire first in every Raylight workflow, and it's the one that makes the whole multi-GPU idea real. Load Diffusion Model (Ray) takes a diffusion model and loads it into your Ray workers - either fully on every GPU or sharded across them with FSDP - so that the Ray samplers downstream can actually run across your cards. Forget the ComfyUI-native "Load Diffusion Model"; in a raylight graph, this replaces it.
Raylight is Komikndr's pack for the "why buy a 5090 when two 5070s" crowd - it got ~120 exact-mention threads on r/StableDiffusion and r/comfyui through mid-2026, and the community consensus tracks the author's own caveat: it genuinely stacks VRAM and splits work, but topology and patience matter. USP (via XDiT's Ulysses attention) splits the sequence; FSDP2 shards the weights. This loader is the entry point to all of it.
How it works
The node takes the RAY_ACTORS_INIT output from Ray Init Actor (the node that spawns your workers and holds the parallel config - Ulysses degree, ring degree, CFG degree, FSDP on/off), plus a model file and a precision. It calls an "ensure fresh actors" step - meaning if the config changed, it re-spawns workers rather than reusing a stale cluster - then loads the model into every worker. Under FSDP, the weights get sharded across workers so a 14B model can live in the combined VRAM of two 16GB cards; without FSDP, each GPU holds a full copy and only the sequence work is split.
The weight_dtype dropdown is where you make your precision call, and this is the part beginners get wrong:
- default - what the model file specifies. Fine for small models.
- fp8_e4m3fn - the workhorse for big models (Wan 14B, Flux, Qwen 20B). Half the VRAM of bf16 with near-invisible quality loss. The author's own benchmarks run nearly everything fp8 E4M3.
- fp8_e4m3fn_fast - same fp8, with extra fp8 math optimizations on top. A bit more speed, slightly more edge-case risk.
- fp8_e5m2 - the older, lower-quality fp8 variant. Skip unless a model specifically wants it.
- bf16 / fp16 - full precision. Use when VRAM allows or the model misbehaves in fp8.
The rule of thumb: if it fits in bf16, use bf16; if it doesn't, fp8_e4m3fn is basically fine and you should stop worrying about it. That's the same guidance the KB gives for quantization generally - reach for fp8 when the model genuinely doesn't fit.
There's also an optional lora input (a RAY_LORA from Load Lora Model (Ray)) if you want to stack a LoRA at load time. Full LoRA support landed in the 1.6-era update and covers Wan, Flux, Qwen, Hunyuan, Chroma, and friends.
The inputs that matter
- ray_actors_init - from Ray Init Actor. This is a separate type from the
RAY_ACTORSthe loader outputs, which is the model-carrying chain that flows into your sampler. New users mix these up constantly. - unet_name - dropdown of everything in
models/diffusion_modelsandmodels/checkpoints. GGUF quantized diffusion models work here too (USP mode) via the pack's GGUF expansion. - weight_dtype - see above.
Install
ComfyUI Manager → search raylight → install. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
<your_python> -m pip install -r requirements.txt
That installs ray>=2.48, xfuser>=0.4.4, kernels, huggingface_hub, and hf_transfer. Two extras to know about:
- Nvidia + FSDP + fp8 → pin the NCCL lib:
pip install nvidia-nccl-cu12==2.28.9. Skip it and you'll chase weird FP8 communication errors. - PyTorch → 2.8.1 is what the pack targets; FSDP won't behave on older versions. FlashAttention is optional now - SageAttention or even the torch backend work.
Common issues
The big one is OOM at load time: if the model is bigger than one GPU's VRAM and FSDP isn't on, the loader can blow up because the full weights pass through a single worker first. Enable FSDP in Ray Init Actor, or use FSDP CPU offload (the block-swap analogue) for very low VRAM. Also, when you change parallel settings, expect a fresh worker spawn - that's the "model loading again" delay, not a hang. And if you see NCCL errors on Windows, that's the known wall: Windows is effectively unsupported, the author says to run WSL and symlink your model directory in.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | 0 options: | |
| weight_dtype | COMBO | 6 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2, bf16, fp16 | |
| ray_actors_init | RAY_ACTORS_INIT | Ray Actor to submit the model into | |
| loraopt | RAY_LORA | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ray_actors | RAY_ACTORS | — |