Nodes/ComfyUI-INT8-Fast-Fork/Save Model INT8 (DynamicVRAM Safe)
ComfyUI Node

Save Model INT8 (DynamicVRAM Safe)

Export your quantized model so you stop re-quantizing it

By SparknightLLC·Created 4 months ago·Updated about a month ago· 44
Save Model INT8 (DynamicVRAM Safe)
  • model
    filename_prefixint8_models/INT8_Model

    If you've dialed in your outlier method and runtime backend and gotten a model quantized just right, you don't want to re-run that conversion every session. This node writes the INT8-patched model out to a checkpoint file, so next time you can just load it - no Enable INT8 on MODEL step required.

    How it works

    The "DynamicVRAM Safe" part of the name is about correctness, not just a label: ComfyUI's dynamic VRAM management can leave parts of a model partially offloaded or only partly resident at any given moment, and a naive save in that state can grab incomplete or stale weights. This node accounts for that so the saved checkpoint is actually correct.

    It also does you a real favor on the way out: it prints counts of how many INT8 weights, weight_scale tensors, and native .comfy_quant layers ended up in the file. That's the compatibility report you need before you go looking for how to reload it. Layers quantized with outlier_method=none or convrot get native ComfyUI .comfy_quant metadata written - meaning the resulting checkpoint reloads with ComfyUI's own stock Load Diffusion Model node, no Toolkit required. Layers quantized with quarot or hadanorm are Toolkit-specific transforms core ComfyUI doesn't understand, so they don't get that metadata, and a checkpoint containing them needs to come back through Load Diffusion Model INT8 (W8A8) instead.

    The inputs and outputs that matter

    • model - the INT8-patched model you want to write to disk.
    • filename_prefix (default int8_models/INT8_Model) - where the file goes and what it's named, following ComfyUI's usual output-folder-plus-prefix convention.

    This is an output node - it has no MODEL output of its own. It writes the file and prints its diagnostic counts to the console; that's the whole job.

    How to install it

    • ComfyUI Manager - search "ComfyUI-INT8-Fast-Fork", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/SparknightLLC/ComfyUI-INT8-Fast-Fork, then restart ComfyUI.

    No model downloads needed - just enough disk space in your output directory for a full checkpoint, since you're writing out the whole quantized model.

    Common issues & troubleshooting

    Want the saved file to reload without the Toolkit installed? Quantize with outlier_method=none or convrot upstream, on Enable INT8 on MODEL or the INT8 loader. Those are the two outlier methods that write native .comfy_quant metadata - a checkpoint saved from quarot or hadanorm layers is locked to this pack's own loader.

    Not sure if your save actually got native-compatible layers. Read the counts this node prints after saving. Zero native .comfy_quant layers means the whole file needs the Toolkit loader to come back; a healthy count means you (or anyone you share the checkpoint with) can load it with plain ComfyUI.

    When is this actually worth doing? Once, per model, after you've settled on your quantization settings - not every time you run a workflow. On-the-fly quantization is fine for experimenting, but if you're going to use the same INT8 model repeatedly, saving it here turns a repeated conversion cost into a one-time cost. Loading a saved checkpoint is just faster than re-quantizing from float or fp8 on every session start.

    Categoryloaders

    Inputs (2)

    NameTypeDefaultDescription
    modelMODEL
    filename_prefixSTRINGint8_models/INT8_Model

    Outputs (0)

    No outputs