Ray Init Actor
The node that turns your GPUs into one big one
- ray_actors_init
Ray Initializer is the front door to Raylight, the multi-GPU pack from Komikndr that has gotten a lot of attention for making "why buy a 5090 when you can buy 2x5070s" a real workflow instead of a meme. Every raylight graph starts here: it's the node that spawns the Ray workers, decides how your GPUs cooperate, and hands the result to the Ray samplers that do the actual generation. Nothing else in the pack works until this node has run.
Raylight works by launching one Ray actor per GPU - a separate process that owns that card. Ray (the distributed-computing framework raylight is named after) manages those actors, and XDiT/xfuser handle the tensor splitting between them. This node is where you configure that whole circus: how many workers, which parallel strategy, whether to shard weights, and what attention backend to use. The author's community posts and the pack's own README confirm the pitch: two mid-range cards genuinely get used simultaneously, both for splitting the work (USP) and splitting the model weights (FSDP).
What the inputs actually mean
You'll set maybe half of these. The rest are "leave it and feel clever later."
- GPU - how many Ray workers (GPUs) to launch. This is your total.
- ulysses_degree - sequence parallel degree. Ulysses splits the sequence/tokens across GPUs, which is how two cards render one video. Set it to your GPU count for sequence-parallel work.
- FSDP - the important one. When on, model weights are sharded across GPUs instead of duplicated, so two 12GB cards can hold what one 24GB card couldn't. This is raylight's "stack your VRAM" mode.
- FSDP_CPU_OFFLOAD - when FSDP is on, push inactive shards to system RAM. You lose a lot of speed; you gain the ability to run big models on small cards.
- cfg_degree - set to 2 to run the conditional and unconditional CFG passes on separate GPUs. Basically free parallelism on video models that use CFG.
- dp_degree - data parallel: each GPU runs a full sequence independently (great for different prompts per GPU). Leave 0 or 1 unless you're using the Unified Parallel Sampler.
- XFuser_attention - the attention backend. Default
TORCH_FLASHis fine;SAGE_FP8/SAGE_FP16are the speed picks on supported GPUs. - clear_vram_after_sampling - release worker VRAM after sampling so normal Comfy nodes can use the cards again.
- use_mmap - mmap-backed safetensor loading. Reduces RAM spikes on big checkpoints; harmless to leave on.
The one output, ray_actors_init, feeds the Ray samplers - XFuser KSampler, Data Parallel KSampler, or the Unified Parallel Sampler. Pick the sampler that matches the parallelism you configured here.
Installing
Via ComfyUI Manager (search "raylight"), or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
It needs ray and xfuser, and the README is explicit that PyTorch 2.8.1 is the sweet spot - FSDP misbehaves on 2.7.1 or earlier. FlashAttention is now optional (a relief, that install used to be an afternoon). No model files to download; your existing ComfyUI checkpoints are used as-is.
Where people get burned
- NCCL errors are the classic. Fix:
pip install nvidia-nccl-cu12==2.28.9, which raylight uses instead of PyTorch's bundled NCCL for FP8 comms. - The degrees must multiply to your GPU count (ulysses × ring × cfg × dp = GPU). If they don't, workers sit idle or the graph throws.
- Ring attention > 1 has a known VRAM leak - the README says so itself. Keep ring_degree at 1 and use Ulysses.
- Windows doesn't work out of the box. The README's honest advice is to run in WSL and symlink your models dir.
- PCIe topology matters. If your second card is on a different socket, expect slower peer transfers - that's hardware, not a bug.
Start with the example workflows that ship in the pack's example_workflows/ folder (Wan T2V is the best first one) before building your own graph.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_cluster_address | STRING | local | Ray cluster address. Use `local` for one machine, or a Ray head address for a remote cluster. |
| ray_cluster_namespace | STRING | default | Ray namespace used to isolate this session from other Ray jobs. |
| GPU | INT | 2 | How many GPUs / Ray workers to launch. |
| ulysses_degree | INT | 2 | Sequence parallel degree for Ulysses. Set above 1 to split sequence work across GPUs. |
| ring_degree | INT | 1 | Ring attention degree. Usually leave at 1 unless you are intentionally testing ring parallelism. |
| cfg_degree | INT | 1 | CFG parallel degree. `2` splits conditional and unconditional passes across GPUs. |
| dp_degree | INT | 1 | Data-parallel degree. Just use 1 or leave 0 when using Unified Parallel Sampler to auto use the remaining GPUs after ulysses/ring/cfg. |
| sync_ulysses | BOOLEAN | false | Force a more synchronized Ulysses path. Can help with some VRAM spikes, but may be slower. |
| clear_vram_after_sampling | BOOLEAN | false | Release Ray worker VRAM after sampling so regular Comfy nodes can use the GPU. |
| FSDP | BOOLEAN | false | Enable FSDP weight sharding across GPUs. |
| FSDP_CPU_OFFLOAD | BOOLEAN | false | When FSDP is on, offload inactive model shards to CPU RAM. |
| XFuser_attention | COMBO | TORCH_FLASH | Attention backend used by xFuser-enabled execution. |
| skip_comm_test | BOOLEAN | false | Skip the startup NCCL communication test. Faster startup, but distributed issues are caught later. |
| use_mmap | BOOLEAN | false | Use mmap-backed safetensor loading. This can reduce RAM spikes during model load, especially for large checkpoints. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ray_actors_init | RAY_ACTORS_INIT | — |