Nodes/SP-Nodes/SP-UnetSave
ComfyUI Node

SP-UnetSave

Bake an in-graph model edit into a file you can just load next time

By bananasss00·Created 2 years ago·Updated 6 days ago· 20
SP-UnetSave
  • model
    filename_prefixcheckpoints/ComfyUI

    If you've built some kind of model surgery inside your graph - a LoRA merge, a randomized block-wise blend with this pack's GodnessMerger nodes, a block-weight experiment on Flux - re-running that merge on every single queue is wasted compute once you know it's the version you want. This node writes the resulting MODEL to disk as a file, so from then on you just load it normally instead of rebuilding it every run.

    How it works

    It's a plain output node: feed it a model, give it a filename_prefix (default checkpoints/ComfyUI, saved the same way ComfyUI's own save nodes handle a prefix - as a path relative to your output directory), and it writes the file. No outputs come back out of it.

    Worth noting what "Unet" in the name means: this saves the diffusion model weights only, not a full bundled checkpoint with CLIP and VAE baked in. That pairs naturally with the rest of this pack's model-focused tools - the path-based LoRA loaders and the GodnessMerger nodes all operate on MODEL alone too, so a workflow built entirely out of SP-Nodes pieces stays consistent about what it's actually modifying.

    The inputs that matter

    • model - whatever you've built up to this point in the graph.
    • filename_prefix - where it lands. The default checkpoints/ComfyUI puts it in a checkpoints subfolder of your output directory with an auto-incrementing suffix, the same convention ComfyUI's stock save nodes use.

    When you actually need this

    If your model edit is deterministic and cheap - a single fixed-strength LoRA applied the same way every time - there's not much reason to bother saving it out; ComfyUI's own caching already skips re-running unchanged nodes on repeat queues. This node earns its keep once the merge itself is expensive or non-deterministic: a big block-wise GodnessMerger blend, or a randomized merge you only want to commit to after reviewing the result. At that point, saving once and loading the saved file afterward is strictly less work than re-rolling the same random merge on every run and hoping it lands the same way.

    How to install it

    Through ComfyUI Manager: search "SP-Nodes," install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bananasss00/ComfyUI-SP-Nodes
    

    Restart ComfyUI afterward.

    Common issues

    Make sure whatever subfolder you point filename_prefix at either already exists under your output directory or is something ComfyUI can create - a malformed or unusually deep path is the most likely thing to trip this up. If you're chaining a randomized merge (GodnessMerger and friends) before this node, remember the saved file itself won't carry any record of what ratios went into it - GodnessMerger_Apply's RATIO_VALUES output is where that information lives, so grab and save that separately (a text file next to your output, a note, whatever) if you want any hope of reproducing this exact blend later. The saved model file is just weights; it doesn't remember how it got made.

    CategorySP-Nodes

    Inputs (2)

    NameTypeDefaultDescription
    modelMODEL
    filename_prefixSTRINGcheckpoints/ComfyUI

    Outputs (0)

    No outputs