CFGZeroStar (Ray)
The overshoot-correction nobody documents
- ray_actors
- ray_actors
High CFG doesn't just oversaturate - it can overshoot, pushing predictions past the intended denoising target in a way that shows up as burnt detail and plastic texture. RayCFGZeroStar is a post-CFG correction that tries to claw that overshoot back, and it's the kind of node that ships in a pack like Raylight without a paragraph of explanation. The changelog doesn't even mention it. So here's the paragraph.
How it works. After CFG combines the conditional and unconditional predictions, the node compares how much the conditional direction overlaps the unconditional one - mathematically, it projects the conditional-minus-input onto the unconditional-minus-input and derives a scale from that projection. Then it nudges the combined output back toward the unconditional prediction proportionally to that overlap. The practical effect: when the conditional and unconditional directions are highly aligned, the CFG output gets pulled back from overshooting; when they diverge, it leaves it mostly alone. It's a self-correcting bound on guidance, the kind of trick you'd expect to see in a research paper and instead find in one man's GitHub repo.
The inputs that matter. Exactly one: ray_actors. No strength, no blend, no toggle. It's a fixed correction - either you want it or you don't, and the only dial you get is adding or removing the node from the chain.
Output. ray_actors, passed through - same patch-node contract as RayCFGNorm: wire it in series between the initializer and the sampler, and it patches the model on every worker.
Where it fits. This is a companion to RayCFGNorm for high-CFG setups that still look wrong after normalization. RayCFGNorm fixes the magnitude of the output; RayCFGZeroStar tries to fix the direction of the overshoot. If you're running SDXL-class models with aggressive guidance and the contrast is fine but the detail is still burnt, this is worth an A/B test - add it, run, compare, remove it, run, compare. Given there's exactly one input, the A/B test is about as cheap as it gets.
The honest caveat: with one knob and no docs, this node has an "experimental fix" smell. Some people find it quietly cleans up their high-CFG output; others find it makes no difference. Both are valid, and the only way to know which camp you're in is to run the comparison. It also does nothing on CFG=1 models - no branches, no overshoot, no point.
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 dependency, FlashAttention is optional, Windows means WSL2.
If you're only going to reach for one overshoot fix, RayCFGNorm is the more predictable one. If that's not enough, this is the second lever - one input, five minutes to test, no downside beyond the A/B time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ray_actors | RAY_ACTORS | — |