Nodes/ComfyUI-Apt_Preset/Data_presetData
ComfyUI Node

Data_presetData

Pull loader metadata back out of a context

By cardenluoĀ·Created 2 years agoĀ·Updated 17 days agoĀ· 309
Data_presetData
  • context
  • context
  • ckpt_name
  • unet_name
  • clip1_name
  • clip2_name
  • clip3_name
  • clip4_name
  • pos
  • neg
  • width
  • height
  • batch

Data_presetData reads a context bus and unpacks the loader-configuration side of it - which checkpoint or unet was loaded, which clip files, the positive and negative prompt text, and the width/height/batch that were set - as separate outputs you can wire elsewhere. It's the node you'd reach for if you wanted to, say, echo the exact prompt string a preset used onto a display node, or match a downstream resize to the same width/height a loader set up.

It's filed under the pack's Deprecated category, so treat it as legacy rather than something to build a new workflow around. Judging by the pack's overall direction, Data_basic (which unpacks model/clip/vae/conditioning/latent from a context) and Data_select (which pulls one named field at a time via a dropdown) cover this same ground going forward with a more general design - worth checking those first for a new build.

How it works

You wire in a context from one of the pack's preset-capable loaders, and it fans that bus out into individually-typed outputs: the model/unet/clip filenames that were loaded, the resolved positive and negative prompt strings, and the width, height, and batch size the preset configured. It's read-only - unlike Data_basic, there's nothing here to override, this node is purely for inspecting what a preset already set.

The inputs and outputs that matter

  • context (optional, RUN_CONTEXT) - the bus to read from. No required inputs at all, which means running this node with nothing wired just gives you empty outputs rather than an error.
  • Outputs: context (passed through unchanged), ckpt_name, unet_name, clip1_name through clip4_name (the loaded model/clip filenames - the pack's loader supports up to four clip slots for models like SD3.5 and Hi-Dream, per its own README), pos / neg (STRING, the resolved prompt text), and width / height / batch (INT).

Pull whichever fields you actually need; the rest just sit unused.

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 from the cloned folder through ComfyUI's embedded Python. Linux/Mac: activate your ComfyUI venv and install the requirements manually from that folder. Restart ComfyUI. No extra dependencies specific to this node.

Common issues & troubleshooting

All outputs come back empty. context is optional at the schema level, which means an unwired node won't error - it'll just silently produce nothing. Confirm the bus is actually connected before assuming the node is broken.

Filename outputs don't match what you expected from the loader UI. These reflect whatever the preset baked into the context at load time, not necessarily whatever's currently selected live in a loader node's dropdown if you changed it after the fact - reload or re-run the loader if you've since switched models.

It's deprecated - should you migrate? If you're actively building something new, yes: start with Data_select for pulling one field at a time (it covers model, clip, positive, negative, vae, latent, and more via a single dropdown), or Data_basic if you need several fields off the same context at once. Keep Data_presetData around only if you're maintaining an older workflow that already depends on it.

CategoryApt_Preset/🚫Deprecated/🚫

Inputs (1)

NameTypeDefaultDescription
contextoptRUN_CONTEXT—

Outputs (12)

NameTypeDescription
contextRUN_CONTEXT—
ckpt_name—
unet_name—
clip1_name—
clip2_name—
clip3_name—
clip4_name—
posSTRING—
negSTRING—
widthINT—
heightINT—
batchINT—