Bernini-R Guidance Config
CFG, APG, RAAG, S2, Z2, STG — which one do you actually want?
- guidance_config
Every diffusion sampler needs a guidance strategy, and most give you one. This pack gives you seven, all mutually exclusive, all exposed through one dropdown. BerniniR_GuidanceConfig is a pure config node - it outputs a BERNINI_GUIDANCE_CONFIG object that the sampler consumes, and if you never connect it you just get plain CFG, which is honestly a fine default. But the other modes exist for a reason, and once you've hit the CFG ceiling - oversaturation at high scales, or prompt adherence that tops out - one of them is usually the unlock.
The modes, quickly
- CFG - standard classifier-free guidance. Two forward passes. The default, and the baseline you should judge everything else against.
- APG (Adaptive Projected Guidance) - decomposes the CFG update into parallel and orthogonal components and suppresses the parallel one, which is the main source of oversaturation. Same two passes, but lets you push guidance higher without the color bleeding to death. This is the mode I'd reach for first when detail tops out.
- RAAG (Ratio-Aware Adaptive Guidance) - adapts the guidance weight per step based on the divergence between conditional and unconditional predictions. Early steps run at near-zero guidance, later steps converge to your target. Good when a static CFG fights the start of the video.
- S2 (Stochastic Self-Guidance) - builds a "weak model" by randomly dropping ~10% of transformer blocks per step, then repels the prediction away from it. Three passes, meaningfully slower.
- Z2 (Zero-Cost Zigzag) - pure algebra, no extra passes.
z2_collapseEMA-smooths the velocity across steps to kill the temporal jitter Z² can introduce in video. - STG_A / STG_R (Spatiotemporal Skip Guidance) - skips self-attention at chosen blocks to build the weak model. Three passes. STG_A zeroes the self-attention output; STG_R skips the residual.
The cost split is real: the two-pass modes (CFG, APG, RAAG, Z2) are cheaper, and the three-pass modes (S2, STG_A, STG_R) cost you a third prediction per step - on a model as heavy as Bernini-R, that's a big "no" on anything but the fastest setups.
The inputs you'll actually touch
Every mode's parameters are always visible, but only the active mode's matter:
- apg_eta (0.15 default) - parallel-component attenuation. 0 = fully suppress, 1 = standard CFG. Mild at 0.15, strong at 0.5.
- apg_rescale - rescales output to the conditional prediction norm. Keep it on.
- raag_alpha - decay rate, 0.1-10. Higher = stronger early-step damping.
- s2_omega - repulsion strength.
- stg_scale and stg_block_idx - guidance strength and which blocks to skip (
"10,20,27"default; Wan 1.3B has 30 layers, 14B has 40). - z2_collapse - 0 = off, higher = smoother.
Output and wiring
One output: guidance_config → the guidance_config input on BerniniR_KSampler or BerniniR_DualExpertSampler. Leave it disconnected for plain CFG.
The honest recommendation
Start at CFG 6-8. If detail maxes out and colors start frying, switch to APG with apg_eta 0.15 - the README's own suggested path - and let it go to CFG 8-12. The three-pass modes are for when you've exhausted the cheap options and you have the compute. And one thing to remember: guidance strength can be made time-varying by wiring a BerniniR_GuidanceStrengthSchedule in alongside this node. The two are orthogonal - this chooses how you guide, the schedule chooses how hard at each step.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | CFG | Guidance strategy. CFG = standard. Others provide stronger prompt adherence. |
| apg_eta | FLOAT | 0.150–1 | APG: parallel-component attenuation. 0.15 = mild, 0.5 = strong. |
| apg_rescale | BOOLEAN | true | APG: rescale output norm to target radius (adaptive to CFG). |
| apg_momentum | FLOAT | 0.000–1 | APG: reverse momentum across steps. 0 = off. |
| raag_alpha | FLOAT | 1.00.1–10 | RAAG: decay rate. Higher = stronger early-step damping. |
| s2_omega | FLOAT | 1.00–10 | S²: repulsion strength from sub-network prediction. |
| stg_scale | FLOAT | 1.00–10 | STG: guidance strength. 1.0 is a safe start. |
| stg_block_idx | STRING | 10,20,27 | STG: comma-separated block indices or percentages for attention skip. |
| z2_collapse | FLOAT | 0.300–0.9 | Z²: trajectory-collapse stabilization. 0 = off, higher = smoother. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guidance_config | BERNINI_GUIDANCE_CONFIG | — |