💾 GRAG Preset Manager v3.0
The notebook for your λ and δ experiments
- lambda
- delta
- strength
- info
GRAG is a training-free editing technique that reweights a model's attention keys - you control it with just two numbers (λ, the bias strength, and δ, the deviation intensity) plus an overall strength. That's it. And once you've spent an hour finding the combination that nails your material-swap or color-shift edit, you don't want to write those numbers on a sticky note. That's the whole job of the GRAG Preset Manager: remember them, and hand them back out as numbers you can wire into a controller.
It's a thin utility node, and that's fine. It doesn't patch attention, it doesn't sample anything. It manages a small library of named presets in a YAML file.
What it does
The node has a mode dropdown with four operations:
save- writes the λ/δ/strength triple (plus an optionaldescription,category, anduse_case) to a named preset. Names get normalized (lowercase, spaces → underscores) and stored inpresets/user_custom.yamlinside the pack folder, alongside the built-in preset files.load- looks a preset up and outputs its λ, δ, and strength as three FLOAT ports.delete- removes a user preset from the file.info- returns a formatted summary (parameters, category, description, creation date) as a STRING.
In every mode you pass preset_name; in save mode you also set lambda_value, delta_value, strength_value, and optionally the metadata strings. The four outputs are lambda, delta, strength (all FLOAT) and info (STRING).
The one wiring that makes sense
Load a preset you saved earlier and connect its lambda and delta outputs straight into a controller's override inputs - lambda_override/delta_override on the Simple Controller, or lambda_global/delta_global on the Unified Controller. That's the loop: tune → save → reload later by name instead of re-typing floats. The info string is meant for a ShowText-style node if you want to eyeball what you're loading.
Install and gotchas
Same pack, same install - ComfyUI Manager search "GRAG", or:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-GRAG-ArchAi3D
pip install PyYAML
That PyYAML line isn't optional here. Without PyYAML, save and delete are disabled - the node prints "PyYAML not installed" and returns an error message through the info output. Load and info still work against the 5 hardcoded fallback presets, but you're effectively read-only. The built-in preset files also only load with PyYAML, which is why the README keeps telling you to install it for the "full 54-preset library."
Two more things worth knowing. First, the controllers read their preset dropdowns at ComfyUI startup, so a preset you just saved won't appear in a dropdown until you restart ComfyUI. Second, this node only stores the three-number recipe - it won't save per-layer λ/δ ranges, adaptive schedules, or multi-resolution tier configs from the Unified Controller. If those are your thing, your preset library lives in your workflow JSON instead.
Should you reach for it? If you're bouncing between two or three configurations, honestly no - just bookmark the workflow. But if you're doing real experiments and want a searchable, shareable record of what worked, it's the cleanest path in this pack.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | info | Save: Create new preset | Load: Get preset params | Delete: Remove preset | Info: Show details |
| preset_name | STRING | my_preset | Name for your custom preset |
| lambda_valueopt | FLOAT | 1.000.1–2 | Lambda value to save |
| delta_valueopt | FLOAT | 1.050.1–2 | Delta value to save |
| strength_valueopt | FLOAT | 1.000.1–2 | Strength value to save |
| descriptionopt | STRING | Description of this preset | |
| categoryopt | STRING | user_custom | Category for organization |
| use_caseopt | STRING | Use case description |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| lambda | FLOAT | — |
| delta | FLOAT | — |
| strength | FLOAT | — |
| info | STRING | — |