🎛️ GRAG Simple Controller v3.0
The three-knob GRAG controller that gets you 80% of the way there
- conditioning
- conditioning
GRAG is a training-free image editing trick that reweights the attention keys inside a diffusion model - think of it as a fine-grain editing dial that sits on top of models like Qwen-Image without needing a single fine-tuned weight. It sounds like a lot of math, which is exactly why this node exists: the Simple Controller hides all of it behind three knobs.
The mental model that saves you the most confusion: the controller doesn't do the editing. It stamps a "recipe" onto the conditioning - a set of metadata keys (grag_enabled, grag_lambda, grag_delta, plus a strength multiplier) - and the GRAG Advanced Sampler is the node that reads that recipe and actually reweights the attention keys. The controller is the cookbook, the sampler is the stove. This is why you'll hear people say "nothing happened": the workflow must route through the Advanced Sampler, not the stock KSampler.
The three knobs
enable_grag- the on/off switch. It defaults toTrue, so at least this controller doesn't betray you out of the box.preset- a curated dropdown. The author filters the 54-preset library down to a beginner-friendly ~10: the "Paper:" family (the ones validated in the GRAG paper's stable λ/δ range), "v2.2.1: Balanced," and the "Clean Room" presets tuned for interior-design editing like material swaps and scaffolding removal. "Paper: Balanced" (λ=1.05, δ=1.10) is the recommended starting point, and it's the default for good reason.strength- the intensity slider, 0.0 to 2.0. Here's the clean logic: the preset's λ and δ are a deviation from neutral (1.0), and strength scales that deviation. At 0.0 you get λ=δ=1.0 (literally no change), at 1.0 you get exactly the preset's intended values, at 2.0 you get double the deviation. So strength is a proportional fade in/out, not a raw multiplier.
There are also two optional overrides, lambda_override and delta_override. Leave them at -1.0 (their default) to let the preset + strength do their thing; set them to anything 0.1–2.0 and they completely take over, ignoring the preset. That's your escape hatch when a preset is close but not quite.
Inputs and outputs
The only required input is conditioning - the tooltip says it right: conditioning from any encoder (Qwen, Flux, SD3, etc.). In practice, for GRAG to do anything, the model down the line needs to be Qwen-based, because the sampler's patch targets Qwen-style attention. So feed it your Qwen-Image / Qwen-Image-Edit conditioning and wire the single conditioning output into the Advanced Sampler's positive. That's the whole data flow: encoder → Simple Controller → Advanced Sampler → VAE Decode.
Installing it
It ships with the whole pack, so the install is one step:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-GRAG-ArchAi3D
Or use ComfyUI Manager and search "GRAG" / "ArchAi3d", then restart ComfyUI. Nothing heavy to download - no model files. If you install PyYAML (pip install PyYAML), you unlock the full 54-preset library; without it you get 5 hardcoded presets. For the Simple Controller's filtered dropdown this barely matters, since the ~10 shown are the same curated few.
Where people get burned
The classic failure is expecting the change to happen at the controller. It won't - the effect only appears after the Advanced Sampler runs, and only if the console shows "Patched XX Attention layers." If you see that line and still no change, your preset is at or near neutral (λ and δ both ≈ 1.0), so bump strength or pick a stronger preset. And if you outgrow the filtered dropdown - say you want all 54 presets or per-layer control - that's the cue to move up to the Unified Controller. For most editing work, this three-knob node gets you 80% of the result with a tenth of the fiddling.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | Conditioning from any encoder (Qwen, Flux, SD3, etc.) | |
| enable_grag | BOOLEAN | true | Enable GRAG attention guidance (turns effect on/off) |
| preset | COMBO | Paper: Balanced | Choose a preset effect - 'Paper: Balanced' is recommended for beginners |
| strength | FLOAT | 1.00–2 | Effect intensity: 0.0=no change, 0.1=minimal, 1.0=preset's intended effect, 2.0=very strong |
| lambda_overrideopt | FLOAT | -1.00-1–2 | Manual λ (lambda) override. -1.0=use preset+strength, 0.1-2.0=custom value (1.0=neutral) |
| delta_overrideopt | FLOAT | -1.00-1–2 | Manual δ (delta) override. -1.0=use preset+strength, 0.1-2.0=custom value (1.0=neutral) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |