ComfyUI Node
Bernini-R Apply NAG
Attaches NAG (Normalized Attention Guidance) data to the positive conditioning and passes through negative for CFG. Connect the same negative prompt used for CFG as the NAG guidance signal. If negative is not connected, both outputs pass through unchanged (NAG disabled). https://github.com/ChenDarYen/Normalized-Attention-Guidance
Bernini-R Apply NAG
- positive
- negative
- positive
- negative
◄nag_scale11.0►
◄nag_tau2.5►
◄nag_alpha0.25►
◄inplacetrue►
CategoryBernini-R/Conditioning
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | Positive text conditioning | |
| nag_scale | FLOAT | 11.00–100 | NAG guidance strength. Higher = stronger attention steering |
| nag_tau | FLOAT | 2.50–10 | Norm-clamp threshold. Controls how aggressively outlier attention is suppressed |
| nag_alpha | FLOAT | 0.250–1 | Blend factor between original and NAG-steered attention |
| negativeopt | CONDITIONING | Negative text conditioning (used for both CFG and NAG guidance) | |
| inplaceopt | BOOLEAN | true | Reuse tensors in-place to save VRAM |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |