ComfyUI Node
⚗ Alchemica Attention Guidance (NAG / PAG / SEG)
Attention guidance for Krea 2: NAG (a negative prompt that works at cfg 1) and SEG/PAG (structure).
⚗ Alchemica Attention Guidance (NAG / PAG / SEG)
- model
- negative
- model
- report
◄nag_scale3.0►
◄nag_tau2.5►
◄nag_alpha0.25►
◄nag_blocksall►
◄nag_sigma_start-1.00►
◄nag_sigma_end0.00►
◄structureoff►
◄structure_scale0.00►
◄structure_blocks8-19►
◄seg_blur10.0►
◄structure_sigma_start-1.00►
◄structure_sigma_end0.00►
Category⚗ AlchemicaMente/model_patches
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| nag_scale | FLOAT | 3.00–20 | NAG: strength of the negative at cfg 1. 0 = off. Validated: 3 (the unwanted element disappears, image unchanged) |
| nag_tau | FLOAT | 2.51–10 | NAG: norm limit (how far it may move away from the positive) |
| nag_alpha | FLOAT | 0.250–1 | NAG: blend with the original attention |
| nag_blocks | STRING | all | DiT blocks (0-27): 'tutti' (all), '0-13', '5,8,10-12' |
| nag_sigma_start | FLOAT | -1.00-1–1 | NAG active from this sigma downwards. 1.0 = from the start (may change the composition). -1 = from the profile's hand-off sigma (~0.87): removes the negative WITHOUT changing the composition |
| nag_sigma_end | FLOAT | 0.000–1 | NAG active down to this sigma |
| structure | COMBO | off | PAG = identity attention: crisper, more contrasty rendering (measured: scale 1 from -1, image unchanged, fewer freckles). SEG = blurred queries: halos above 0.3. Each costs 1 extra model call per step inside the window |
| structure_scale | FLOAT | 0.00-5–10 | Strength of the structure guidance. 0 = off |
| structure_blocks | STRING | 8-19 | — |
| seg_blur | FLOAT | 10.00.5–1000 | SEG: gaussian sigma in tokens (>=1000 = infinite) |
| structure_sigma_start | FLOAT | -1.00-1–1 | Structure guidance window: from this sigma... (-1 = from the profile) |
| structure_sigma_end | FLOAT | 0.000–1 | ...down to this one (costs only inside the window) |
| negativeopt | CONDITIONING | The negative for NAG (from the ⚗ Text node) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| report | STRING | — |