Nodes/ComfyUI-GRAG-ArchAi3D/💾 GRAG Preset Manager v3.0
ComfyUI Node

💾 GRAG Preset Manager v3.0

The notebook for your λ and δ experiments

By amir84ferdos·Created 10 months ago·Updated 10 months ago· 20
💾 GRAG Preset Manager v3.0
    • lambda
    • delta
    • strength
    • info
    modeinfo
    preset_namemy_preset
    lambda_value1.00
    delta_value1.05
    strength_value1.00
    description
    categoryuser_custom
    use_case

    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 optional description, category, and use_case) to a named preset. Names get normalized (lowercase, spaces → underscores) and stored in presets/user_custom.yaml inside 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.

    CategoryGRAG/v3.0

    Inputs (8)

    NameTypeDefaultDescription
    modeCOMBOinfoSave: Create new preset | Load: Get preset params | Delete: Remove preset | Info: Show details
    preset_nameSTRINGmy_presetName for your custom preset
    lambda_valueoptFLOAT1.000.1–2Lambda value to save
    delta_valueoptFLOAT1.050.1–2Delta value to save
    strength_valueoptFLOAT1.000.1–2Strength value to save
    descriptionoptSTRINGDescription of this preset
    categoryoptSTRINGuser_customCategory for organization
    use_caseoptSTRINGUse case description

    Outputs (4)

    NameTypeDescription
    lambdaFLOAT
    deltaFLOAT
    strengthFLOAT
    infoSTRING