Nodes/SDVN_Comfy_node/🧬 Model Export
ComfyUI Node

🧬 Model Export

Fp8-convert, strip, or repackage a model file on disk

By StableDiffusionVNΒ·Created 2 years agoΒ·Updated about a month agoΒ· 118
🧬 Model Export
      β—„Optionβ–Ύβ–Ί
      β—„Input_pathβ–Ί
      β—„Output_pathβ–Ί

      This is a batch file-conversion utility, not a generation node - it doesn't run in your sampling graph at all, it just reads a model file from one path and writes a transformed version to another. Three operations, one node, no preview, no output socket: point it at a file, pick an operation, run the workflow once, check the output folder.

      What the three operations do

      Unet_to_fp8.pt converts a UNet's weights down to fp8 precision. Quantizing to fp8 roughly halves file size against fp16 with a small, usually acceptable quality cost - it's the same trade the wider ecosystem makes constantly with big diffusion models (Flux-class UNets, video models) that don't comfortably fit consumer VRAM at full precision. If you're merging or fine-tuning at fp16 and want a smaller file to actually load day-to-day, this is the export step for that.

      Lora_remove_clip strips the CLIP-related weights out of a LoRA file, leaving only the UNet portion. Some LoRAs (especially ones trained with certain trainers) bundle CLIP deltas that most ComfyUI workflows never load anyway; stripping them shrinks the file without touching the part that actually does the work in a typical UNet-only LoRA loader setup.

      Checkpoint_to_model repackages a checkpoint into the plain model format ComfyUI's core loaders expect - useful when a checkpoint arrived in a layout ComfyUI doesn't load cleanly out of the box.

      The node doesn't document exactly what's happening inside each conversion beyond the option name, so treat it as a one-shot batch tool: point it at a file, pick the operation that matches what you're trying to produce, and check the result rather than assuming.

      The inputs and outputs that matter

      • Option - the conversion to run: Unet_to_fp8.pt, Lora_remove_clip, or Checkpoint_to_model.
      • Input_path - full path to the source file.
      • Output_path - full path (including filename) to write the result to.

      No outputs - it's an output node in the ComfyUI sense (it runs and produces a side effect) but has nothing to wire downstream. The result lands on disk at Output_path.

      Installing it

      ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
      

      Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart.

      Where people get burned

      Nothing happens if the paths are wrong, and there's no output socket to catch the error downstream. Since this node doesn't feed into anything else, a typo'd Input_path or a missing parent folder for Output_path just fails quietly on its own branch of the graph - check the console log after running, not the canvas.

      fp8 is a real quality trade, not a free lunch. Community consensus on fp8-vs-fp16 for large UNets is that it's close to indistinguishable for most work, but it is a trade - don't reach for Unet_to_fp8.pt on a model you're about to fine-tune further, only on one you're done training and just want a leaner file to run.

      Wrong operation for the file type. Lora_remove_clip expects a LoRA, Unet_to_fp8.pt expects a UNet, Checkpoint_to_model expects a full checkpoint. Running the wrong operation against the wrong file type is the most likely source of a garbage or crashed output - match the option to what's actually in Input_path.

      CategoryπŸ“‚ SDVN/🧬 Merge

      Inputs (3)

      NameTypeDefaultDescription
      OptionCOMBO3 options: Unet_to_fp8.pt, Lora_remove_clip, Checkpoint_to_model
      Input_pathSTRINGβ€”
      Output_pathSTRINGβ€”

      Outputs (0)

      No outputs