Dual CFG Guider (Ray)
Two positives, one negative, two scales
- ray_actors
- cond1
- cond2
- negative
- guider
Most of the time one positive and one negative are enough. RayDualCFGGuider is for when they aren't - when your generation is pulled by two independent positive conditionings, each with its own scale, both steering away from a shared negative. This is the distributed twin of core ComfyUI's DualCFGGuider, and it's the node you reach for on multi-conditional setups: a style embedding plus your actual prompt, an image conditioning plus text, a character reference plus a scene.
The inputs that matter. Six, all required:
ray_actors- the initializer chain.cond1andcond2- the two positive conditionings.negative- the shared negative.cfg_conds- guidance scale forcond1, default 8.cfg_cond2_negative- guidance scale forcond2, default 8. The name is a mouthful but the meaning is simple: this is how hardcond2pushes against the negative. Don't assume the two scales need to match; a common pattern is a strong style term and a weaker content term.style- two choices:regularandnested. This is the knob people gloss over, and it changes how the two CFG terms combine.regulartreats the two positive terms as parallel branches against the negative;nestedapplies one CFG inside the other's result, which is the closer match for setups where one conditioning is a modifier of the other. If the output looks washed out or over-baked with one style, try the other before touching the scales.
Output. A RAY_GUIDER for DPSamplerCustomAdvanced. Same handoff as RayCFGGuider, just more input ports on the front.
Where it fits. This is a niche node and it knows it. It lives in the custom-sampling stack precisely because that stack is where people build the experimental multi-conditioning graphs. If your model runs at CFG=1 (Flux, Wan, Hunyuan), dual CFG is as pointless as regular CFG - the branches don't exist to split. If you're on SDXL/SD1.5/Chroma-class guidance, though, this is how you get two-conditioning control in a Raylight graph, and it's also one of the few places in the pack where the style option actually rewards experimentation.
Gotchas. The scales defaulting to 8 for both is a trap on modern models - 8 is an SDXL-era number, and models like Chroma want something closer to 3–4. Start both low and raise them one at a time so you can hear each conditioning working. And the usual family rules apply: it's a guider for the custom sampler, not a standalone sampler, and per-GPU behavior only exists when you're in Data Parallel mode with the initializer set correctly.
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. xfuser is the heavy install, FlashAttention is optional, and Windows realistically means WSL2.
If you don't have two distinct conditionings in mind, skip this node - you're adding a knob you won't use. If you do, regular versus nested is the first thing to flip when results surprise you.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | — | |
| cond1 | CONDITIONING | — | |
| cond2 | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| cfg_conds | FLOAT | 8.00–100 | — |
| cfg_cond2_negative | FLOAT | 8.00–100 | — |
| style | COMBO | 2 options: regular, nested |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guider | RAY_GUIDER | — |