Nodes/raylight/Load ControlNet (Ray)
ComfyUI Node

Load ControlNet (Ray)

Load ControlNet onto every GPU, without the serialization tax

By komikndr·Created about a year ago·Updated 2 days ago· 409
Load ControlNet (Ray)
  • ray_actors
  • ray_control_net
control_net_name

In a normal ComfyUI workflow, loading a ControlNet is boring: pick a file, get a model. In Raylight's world it's a design decision, because shipping multi-gigabyte weights across the Ray cluster on every run would be catastrophic for startup time and memory. RayControlNetLoader is the answer - it loads the ControlNet on each worker's GPU from disk, so the weights never cross the cluster boundary. The source docstring: "Works like the standard ControlNetLoader but loads the model on each worker's GPU from disk, avoiding Ray serialization of multi-GB weights."

The inputs that matter. Two, both required:

  • ray_actors - the initializer chain; this tells the loader which workers to load onto.
  • control_net_name - the dropdown of ControlNet files, populated from your ComfyUI/models/controlnet folder. (If you ever see this node with an empty dropdown in a docs scrape, that's just the folder being dynamic at runtime - it fills in once you have files on disk.)

Output. A single ray_control_net - a lightweight reference, not the weights. That handle feeds RayControlNetApply, which is the node that actually injects the ControlNet into your conditioning during sampling.

How it fits. The pairing is: loader → apply → sampler. The loader handles the heavy lifting once, per workflow; each RayControlNetApply attached to it restores the model from the worker-local cache when it needs it. The README's guidance for the whole feature: one ControlNet per workflow, and if you need the same model at different strengths or on different images, use multiple Apply nodes off a single Loader - don't load the file twice.

The constraints that matter. This whole ControlNet path is experimental (credited to avtc in the changelog), and the supported-model tables carry footnotes worth reading before you build around it: Chroma and Hunyuan Video ControlNet support exists in code but has no model weights to test with yet, and Flux ControlNet works through the USP/FSDP paths. So the realistic day-one targets are Flux, Wan, and Qwen ControlNets. The one-ControlNet-per-workflow limit is also a real ceiling - if your mental model of ControlNet involves stacking three at once, reset it before you start.

Install. Part of the pack:

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. Drop your ControlNet files in ComfyUI/models/controlnet and they show up in the dropdown. xfuser is the heavy dependency, FlashAttention is optional, Windows means WSL2.

The thing to remember is that this node is not just a reskinned core loader - the worker-local loading is the entire point. If you try to bypass it with a core ControlNetLoader, you'll be back to serializing gigabytes across the cluster and wondering why your run took an extra five minutes.

CategoryRaylight

Inputs (2)

NameTypeDefaultDescription
ray_actorsRAY_ACTORS
control_net_nameCOMBO0 options:

Outputs (1)

NameTypeDescription
ray_control_netRAY_CONTROL_NET