Model Name Pass
A MODEL pass-through that tells you which checkpoint it came from
- model
- model
- full_model_name
- short/manual name
So you've got a big workflow where the model travels through a chain of nodes - a LoRA here, a patch there - and somewhere downstream you want to write the checkpoint's name into a filename or a caption. The problem: by the time the model reaches your saver, nothing knows what it is anymore. AUNModelNamePass is a pass-through that fixes that. It sits in the model path, does nothing to the model itself, and extracts the name by tracing back through the graph to find the loader that produced it.
How it works
The mechanism is where this gets interesting, because a MODEL tensor doesn't carry its own filename. The node looks at the workflow graph - the extra_pnginfo metadata ComfyUI keeps about what's connected to what - and walks backwards from the model input to find the originating loader node (checkpoint loader, LoRA loader, whatever feeds the chain). It then reads that loader's model name, and outputs it as a string. Drop this node right after your loader (or anywhere in the model path) and you get a full_model_name you can feed into filename builders, path nodes, or text outputs.
It also gives you a second output, short/manual name, with two personalities. By default it's the shortened model name - the same cleaned, filename-safe version the pack's Model Shorten node produces. But there's an override: connect manual_name and flip use_manual_name on, and the short output becomes your name (sanitized), which is great when you want "portrait model" in a filename instead of sd_xl_realistic_thing_v5_fp16.safetensors. The full name output stays truthful regardless.
Inputs and outputs
Inputs: model (required, the MODEL you're passing through). Optional: manual_name (string) and use_manual_name (boolean, default off).
Outputs:
model- the MODEL, untouched, so this node slots into an existing path without changing behavior.full_model_name- the full name traced from the loader.short/manual name- shortened by default, or your manual name when you've flipped the override on.
Installing it
AUN ships all its nodes in one pack:
- ComfyUI Manager: search "AUN ComfyUI Nodes", install, restart.
- Manual:
cd custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart.
Manual installs that throw ModuleNotFoundError: cv2 or piexif need pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.
Common issues
Two things bite people. First, the trace-back only works when the graph metadata is available - if you've disconnected the model from its loader (or the workflow was saved in a way that lost the connection info), the name comes back empty. Keep the model path intact and it's fine. Second, this node returns its own name the moment the node runs, so it doesn't lag behind a changed model mid-session - if you swap the checkpoint and the output looks stale, the graph needs to re-execute, which a queue run does anyway. Neither is a real blocker; they're just "it's a graph, not a live database" reminders.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to pass through and extract from. | |
| manual_nameopt | STRING | Manual model name (optional). When 'use manual name' is on, this value (sanitized) becomes the short/manual output. | |
| use_manual_nameopt | BOOLEAN | false | When true and manual_name is not empty, outputs will use the manual name (sanitized). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| full_model_name | STRING | — |
| short/manual name | STRING | — |