Nodes/ComfyUI_StarNodes/⭐ Star FP8 Converter
ComfyUI Node

⭐ Star FP8 Converter

Shrink a checkpoint to FP8 from inside ComfyUI — no separate conversion script

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star FP8 Converter
    • status
    model_path
    save_name_fp8_scaled_e4m3fn.safetensors

    Quantization is the community's favorite free lunch: FP8 checkpoints run on cards that bf16 versions OOM on, and for most models the quality hit is minor. But converting a checkpoint usually means firing up a Python one-liner outside ComfyUI and getting the paths and flags right. Star FP8 Converter moves that job inside the graph - point it at a .safetensors file, give it an output name, and it writes a converted FP8 copy to your output folder.

    It's in ⭐StarNodes/Helpers And Tools. It's a utility node, not a pipeline node - you run it, read the status message, done.

    How it works

    Two inputs, both plain strings:

    • model_path - the full filesystem path to the source .safetensors file, e.g. F:/ComfyUIModels/models/clip/qwen_3_4b.safetensors. This is not a dropdown, and it doesn't scan your model folders - you type or paste the whole path. The placeholder in the node even shows a Windows-style path, so don't expect folder browsing.
    • save_name - the output base name, defaulting to _fp8_scaled_e4m3fn.safetensors. If you keep the default, the node builds the final filename from the source file's basename plus that suffix (so qwen_3_4b.safetensors becomes qwen_3_4b_fp8_scaled_e4m3fn.safetensors). Give it your own name and that's used instead.

    The node loads the file with safetensors.torch, converts the weights to FP8 (e4m3fn, the standard 8-bit format), and saves the result to ComfyUI/output/models/. The single output is a status string that tells you what happened - including the old and new file sizes - plus friendly error messages for the common cases like a missing source file or an empty save name.

    It's built on the safetensors library (no torch quantization backend required), so it works for any .safetensors checkpoint - diffusion models, text encoders, VAEs. The example in the placeholder is a Qwen CLIP, which is telling: quantizing the big text encoders is where this earns its keep on low-VRAM setups.

    Why you'd use it

    The FP8 pipeline is well-trodden: convert your heavy checkpoints to FP8, keep the bf16 originals as backup, and fit workloads on smaller cards. For the text-encoder problem specifically - Flux's T5, Qwen's 4B, the Gemma encoders in the LTX video nodes are all multi-GB in full precision - an FP8 conversion is the single biggest VRAM win available. If you're always running a node that's one GB over your card's limit, this is the fix.

    Installing it

    Standard StarNodes install - ComfyUI Manager, search Starnodes, install, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
    cd ComfyUI_StarNodes
    pip install -r requirements.txt
    

    Search the canvas for star - it's under ⭐StarNodes/Helpers And Tools.

    Gotchas

    Three things. First, the output lands in your ComfyUI output/models folder - not the models directory and not the plain output folder, so don't go hunting in the wrong place. Second, it's a whole-file conversion with no progress bar on a big model; a 20GB checkpoint takes a while and the only feedback is the status string when it finishes, so don't panic over silence. Third - the one that actually bites people - FP8 is not the same as distilled. Quantization shrinks the file and memory footprint; it doesn't change step count or sampling behavior. If you're converting expecting it to make a slow model fast, you've got the wrong tool. The quality tradeoff is usually small, but it's not zero - keep your bf16 originals.

    Category⭐StarNodes/Helpers And Tools

    Inputs (2)

    NameTypeDefaultDescription
    model_pathSTRING
    save_nameSTRING_fp8_scaled_e4m3fn.safetensors

    Outputs (1)

    NameTypeDescription
    statusSTRING