Ray Init Actor (Advanced)
The Ray init node for people with a second GPU AND opinions
- ray_actors_init
Ray Initializer (Advanced) is the same Raylight entry node as the plain Ray Initializer, plus the knobs you actually want once your setup stops being "two identical cards in the same slot" and starts being "two cards, one of which I also need for CLIP, VAE, and the rest of my graph."
If you only have one way to arrange your GPUs, use the basic version. If you've ever muttered "I wish I could keep GPU 0 out of this," this is the node you want - it's the only initializer with a GPU_SELECT input, and that alone is worth the switch on most multi-GPU boxes.
What the advanced inputs add
Everything from the regular initializer is here - GPU count, ulysses/ring/cfg/dp degrees, FSDP, FSDP CPU offload, attention backend, mmap loading - so I won't repeat it. The new bits:
- GPU_SELECT - a comma-separated list like
1,2that restricts Ray workers to those GPUs. Leave it empty to use everything. This is the whole reason to pick Advanced: reserve GPU 0 for the CLIP encoder, VAE, or a controlnet pass while the workers chew on the diffusion model. The README literally suggests this use case. - ray_object_store_gb - Ray's object-store size. The 2GB default is fine unless you're shuttling big tensors through Ray itself.
- ray_dashboard_address - point it at
127.0.0.1:8265to watch worker memory and activity in Ray's dashboard while you debug. - torch_dist_address - the master address for worker-side NCCL init (default
127.0.0.1:29500). The tooltip's warning is real: restart ComfyUI if you change it, it's read at startup.
Why you'd use this over the basic node
Honestly? Two reasons. First, GPU_SELECT is the difference between "add a second GPU" being a gift and being a headache - without it, Ray grabs every visible card and your VAE/CLIP ends up fighting the sampler for the same VRAM. Second, the dashboard hookup turns the whole "which worker is doing what and how much memory is it using" mystery into something you can watch live. For a tool whose failure mode is "silently slow because one worker is starved," that visibility is worth more than the name "Advanced" suggests.
Everything else is identical to the regular node: output is ray_actors_init, feeding the XFuser / Data Parallel / Unified Parallel samplers, and it's the same install path (ComfyUI Manager → "raylight", or clone + pip install -r requirements.txt). PyTorch 2.8.x is still the recommended version for FSDP, and the NCCL fix (pip install nvidia-nccl-cu12==2.28.9) applies here too.
Troubleshooting
- If a worker OOMs during NCCL collectives, the README notes Ray workers strip
cudaMallocAsyncfrom the allocator config - that's intentional, andRAYLIGHT_KEEP_CUDA_MALLOC_ASYNC=1preserves it if you need it. - New to Raylight entirely? Start with the basic initializer and the pack's example workflows (Wan T2V is the gentlest), then swap in Advanced once you know the degrees you need. The
GPU_SELECTfield defaults to empty, which means "all GPUs," so it behaves like the basic node until you tell it otherwise.
Inputs (18)
| 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. |
| GPU_SELECT | STRING | GPU indices for Ray workers. Use comma separated values like 0,1,2 to limit Ray to those GPUs, or leave empty to use all visible GPUs. Useful if you want to reserve GPU 0 for CLIP or VAE. | |
| 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. |
| clear_vram_after_sampling | BOOLEAN | false | Release Ray worker VRAM after sampling so regular Comfy nodes can use the GPU. |
| cfg_degree | INT | 1 | CFG parallel degree. `2` splits conditional and unconditional passes across GPUs. |
| dp_degree | INT | 1 | Data-parallel degree. Default 1 keeps the legacy layout. 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. |
| 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. |
| ray_object_store_gbopt | FLOAT | 2.00 | Ray object-store size in GB. Usually the default is enough unless you move large tensors through Ray. |
| ray_dashboard_addressopt | STRING | None | Optional Ray dashboard bind address like `127.0.0.1:8265` for monitoring. |
| torch_dist_addressopt | STRING | 127.0.0.1:29500 | Torch distributed master address used by worker-side NCCL init. Restart ComfyUI if you change it. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ray_actors_init | RAY_ACTORS_INIT | — |