Nodes/ComfyUI-DonutNodes/Donut Diffusion Model Save (No Workflow)
ComfyUI Node

Donut Diffusion Model Save (No Workflow)

Save a merged model without the workflow sludge (or accidental fp8)

By DonutsDelivery·Created about a year ago·Updated about 21 hours ago· 22
Donut Diffusion Model Save (No Workflow)
  • model
    filename_prefixdiffusion_models/ComfyUI
    dtypebf16

    If you've merged a model or stacked a few LoRAs and you want the result as a file you can actually reuse, this is the save node to grab - and it exists for two reasons that ComfyUI's built-in saver doesn't cover well. First, it writes the diffusion model with no embedded workflow metadata, so you get a clean safetensors instead of a file that drags your whole graph and prompt along. Second, and this is the part people don't expect: it's one of the few savers that correctly bakes Donut's "Experimental bypass" results. DonutsDelivery is a CivitAI model-maker first (DonutsDeliveryMix and the DonutLora Z-Image character workflow are the public faces), so this pack's save nodes come from someone who actually ships models - the polish shows.

    The trick that makes it worth it

    This is a companion to the pack's experimental modes. DonutApplyLoRAStack's "Experimental bypass" applies LoRAs as forward hooks rather than materialized weight patches, and DonutModelMergeKrea2's bypass keeps model2 hard swaps as runtime-only swaps. Neither touches the state dict, so an ordinary SaveCheckpoint sees a model with no changes baked - you'd save a silently un-merged file. DonutDiffusionModelSave converts bypass LoRAs back into regular adapter patches and composes the model2 swap weights from the retained source model before writing, so what you save is what actually ran. If you're not using the bypass modes at all, it's still a great no-bloat saver, but this is where it earns its keep.

    The inputs

    Only three, all straightforward:

    • model - the patched MODEL you want to persist. Feed it whatever comes out of your merge or LoRA-stack chain.
    • filename_prefix - defaults to diffusion_models/ComfyUI, i.e. it lands in ComfyUI/output/diffusion_models/ as ComfyUI_00001_.safetensors. Existing symlinks under output are explicitly supported, so you can point that folder at a bigger SSD if that's your setup.
    • dtype - the interesting one. It defaults to bf16 on purpose: if ComfyUI loaded your model in fp8, the original option would silently re-save it as fp8 and you'd wonder why your "saved" model looks worse than it should. bf16 gives you full-quality weights with half the fp32 footprint. fp8_e4m3fn/fp8_e5m2 are there if you deliberately want a quantized file on disk.

    It's an output node with no outputs - it just writes the file and tells you where in the console. Note it saves only the model, not CLIP or VAE, and it goes to diffusion_models/, so load it back with ComfyUI's Load Diffusion Model node (or move/symlink it into your models folder), not the full checkpoint loader. If you want a full checkpoint, the pack's DonutCheckpointSave is the sibling for that.

    Installing it

    This ships in ComfyUI-DonutNodes, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
    cd donutnodes
    python -m pip install -r requirements.txt
    

    Or just search "DonutNodes" in ComfyUI Manager and let it handle the pip step. There are no model files to download - the heavy deps in requirements (opencv, scipy, matplotlib) serve the pack's image nodes, not this one. Restart ComfyUI and you're done.

    Gotchas

    Where people get burned: don't point this at a bypass workflow and expect it to fix itself - it bakes bypasses correctly because it knows about them, but only when the whole chain uses Donut's own apply/merge nodes. And it runs the state dict on CPU, materializing one weight at a time to protect low-VRAM rigs, so it needs enough system RAM to hold the full model. Big models, be patient.

    Categoryadvanced/model_merging

    Inputs (3)

    NameTypeDefaultDescription
    modelMODEL
    filename_prefixSTRINGdiffusion_models/ComfyUISaved under ComfyUI/output by default; existing symlinks beneath output are supported for model storage.
    dtypeCOMBObf16Saved weight dtype. BF16 is the default to avoid accidentally preserving an fp8-loaded model. 'original' keeps the currently loaded dtype.

    Outputs (0)

    No outputs