Nodes/ComfyUI_StarNodes/⭐ Star Model Packer
ComfyUI Node

⭐ Star Model Packer

Rejoin split safetensors and flip precision without a merge GUI

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Model Packer
    • status
    input_folder
    precisionFP8
    save_name

    Hugging Face checkpoints often ship as a folder of sharded safetensors - model-00001-of-00004.safetensors and friends - and ComfyUI usually wants one file. Star Model Packer merges those split shards back into a single safetensors file, and while it's at it, converts precision to FP8, FP16 or FP32. It's the file-management version of "reassemble before you use."

    The README lists this under Helpers & Tools next to the FP8 Converter, and the use case is plain: you download a model that's been split for upload convenience (the placeholder in the source hints at a Qwen-style HF folder), and rather than hunt for a merge script or a GUI, you point this node at the folder and get one ready-to-load file. The precision conversion is a genuinely useful bonus - most quantized-model adventures start with "this is too big, give me FP8," and this does the conversion in the same pass.

    How it works

    Set input_folder to the absolute path of the directory holding the split safetensors shards, pick precision (FP8, FP16 or FP32, default FP8), optionally give it a save_name (leave empty and it auto-generates from the folder name plus precision), run the node, and it writes the merged, converted file. The single output, status, is a STRING reporting what happened - check it, because the node's whole result is that message plus the file on disk.

    It's not GPU work - this is disk + CPU tensor handling, so it won't hammer your VRAM. And it's an in-workflow utility, not a standalone tool: you put it on a canvas, run it, and the file appears wherever the node writes.

    Inputs that matter

    • input_folder - where the shards live. Get this exactly right; the placeholder shows the kind of full path the node expects (D:/AI/.../model-...).
    • precision - the output dtype. FP8 shrinks the file most; FP32 is the lossless-but-huge end.
    • save_name - optional; auto-generated from folder + precision if empty.

    Output: status (STRING).

    Install

    Part of the Starnodes2024/ComfyUI_StarNodes pack:

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

    Restart, search star. No extra per-node dependencies.

    Where people get burned

    Precision expectations are the big one: FP8 conversion isn't free quality-wise. It's fine for a lot of diffusion work (the pack's whole quantized-model ecosystem lives happily in FP8), but if you're doing precision-sensitive fine-tuning or comparing outputs A/B, keep an FP32 copy around - the KB's quantization guidance is that you trade a little quality for a lot of size, and you should only drop precision when the file size actually matters to you. Second, this node merges split shards - point it at a folder of unrelated safetensors and it'll error or produce garbage; make sure the shards belong to one model. And it doesn't verify the merge against the source's hash, so trust but verify: load the output once before you delete the shards.

    Category⭐StarNodes/Helpers And Tools

    Inputs (3)

    NameTypeDefaultDescription
    input_folderSTRING
    precisionCOMBOFP83 options: FP8, FP16, FP32
    save_nameSTRING

    Outputs (1)

    NameTypeDescription
    statusSTRING