Nodes/AUN ComfyUI Nodes/Model Name Shorten
ComfyUI Node

Model Name Shorten

Turn a 90-character checkpoint name into a filename you'd actually keep

By loz2754·Created 8 months ago·Updated about 24 hours ago· 5
Model Name Shorten
    • short_name
    full_model_name

    Model names are a disaster as filenames. flux1-dev-fp8_scaled_something_plus_half_final_v3.safetensors is real, it's on your disk, and nobody wants it stamped across their outputs. AUNModelShorten takes a full model name string, does its best to produce a short, filename-safe version, and hands it back as a plain string you can pipe into any filename or path builder. It's a one-trick node, but it's a trick you'll use constantly once you're building naming pipelines.

    How it works

    The shortening isn't a naive "take the first word" hack. It runs the same logic the pack uses everywhere (and that its Extract Model Name node shares). The pipeline: strip the path down to the basename, then check a few rules in order. There's an explicit short-name mapping for known models, so common checkpoints map to their familiar names. It detects the MRG-{ratio}-{model1}-{model2} merge naming convention and reduces it to something sane. If neither applies, it falls back to auto-shortening the base name, then cleans up the result - standardizing separators and handling the GGUF suffix so model_q8_0.gguf becomes a clean model q8-style string.

    The input is one string (full_model_name), the output is one string (short_name). Empty input returns empty - it won't crash your graph for a missing name. That's the whole contract. It does not touch the model itself, does not need the model, and has zero dependence on your graph structure - give it any string and it returns a shortened one.

    When you'd reach for it

    Wire it between a model name source (say, Model Name Pass or Extract Model Name) and your path/filename builder, so your saved files carry a readable portrait_model_1024 instead of the full checkpoint slug. It also composes well with AUN's own filename tools, which expect clean strings. If you're using Windows, shorter filenames also quietly dodge the long-path headaches the pack's README warns about - a real, if incidental, benefit.

    Installing it

    Part of the AUN pack, one install for everything:

    • ComfyUI Manager: search "AUN ComfyUI Nodes", install, restart.
    • Manual: cd custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart.

    Hand-installing and hitting ModuleNotFoundError: cv2? pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.

    Common issues

    The main thing to understand is that shortening is lossy by design - the short name is for naming outputs, not for reconstructing which exact model you used. If you need the full provenance, keep the full name somewhere too (that's what the "full" outputs on sibling nodes are for). And if a name doesn't shorten the way you'd like, remember the rules are heuristic; the explicit mapping covers well-known models, but a one-off random checkpoint gets the auto-shortening path, which is a guess, not a promise.

    CategoryAUN Nodes/Utility

    Inputs (1)

    NameTypeDefaultDescription
    full_model_nameSTRINGThe full model name to shorten.

    Outputs (1)

    NameTypeDescription
    short_nameSTRING