Nodes/ComfyUI-Apt_Preset/Data_preset_save
ComfyUI Node

Data_preset_save

Bake your loader settings into a reusable preset

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
Data_preset_save
  • param
    tomlnamenew_preset
    savetype

    If you've dialed in a loader setup you'll want again - a specific checkpoint plus clip combination, a resolution, a batch size - retyping it every time is exactly the kind of busywork Apt_Preset's whole "Loader → Controller → Sampler" framework is trying to eliminate. Data_preset_save is the write side of that: it takes your currently-configured parameters and saves them as a named preset you can reload from the loader's dropdown later.

    This is the node behind the pack's own README section on preset saving, and the README is explicit about two real gotchas worth knowing before you use it.

    How it works

    You feed it a param bundle - a PDATA object, which comes from one of the pack's preset-capable loader nodes (like the universal loader) rather than from anything in this batch of nodes - plus a name for the preset and whether you're creating a new one or overwriting an existing one. It writes that configuration out as a .toml preset file, which is why the field is called tomlname rather than just "name."

    Per the README, there's a prerequisite you need to satisfy before this even makes sense: the loader node needs at least one preset already selected - any preset, doesn't matter which - or saving will error out. Once one's selected, you're free to change any parameter and save the result as a new preset built on top of it.

    The inputs and outputs that matter

    • param (required, PDATA) - the configuration to save. This comes from a preset-capable loader elsewhere in the pack, not from anything you'd build by hand.
    • tomlname (STRING, default "new_preset") - the filename for the saved preset.
    • savetype (enum: new save / overwrite save) - whether this creates a fresh preset file or replaces an existing one with the same name.

    There are no outputs - this is a pure side-effect node, like a Save Image node, that writes a file and doesn't need to feed anything downstream.

    How to install it

    Bundled with the full pack. Via ComfyUI Manager: search "ComfyUI-Apt_Preset" → Install → restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
    

    Windows: run install.bat afterward through ComfyUI's embedded Python. Linux/Mac: activate your ComfyUI venv and install requirements from the cloned folder by hand. Restart ComfyUI.

    Common issues & troubleshooting

    Save fails with an error before you even get to tomlname. This is the README's own documented gotcha: the loader you're saving from needs some preset already selected first - any one at all - or the save errors out. Pick literally any existing preset in the loader, then adjust parameters and save.

    New preset doesn't show up in the loader's dropdown. Also called out directly in the README: after saving a new preset, ComfyUI needs to be restarted before it becomes selectable. It won't appear live in the same session - this trips people up because most ComfyUI UI changes take effect immediately, but preset files are read at startup.

    Accidentally overwrote a preset you wanted to keep. savetype defaults to whatever you last set, not automatically to "new save" - get in the habit of checking it before hitting run, especially if you're iterating quickly and reusing the same node instance for several experiments.

    CategoryApt_Preset/chx_load

    Inputs (3)

    NameTypeDefaultDescription
    paramPDATA
    tomlnameSTRINGnew_preset
    savetypeCOMBO2 options: new save, overwrite save

    Outputs (0)

    No outputs