CivArchive
    ← All articles
    Published September 14, 2025by mistporyvaev

    Safetensors: unpacking and packing

    57 views0 reactions0 comments on CivitAI0 collected
    pythontoolscripttool guidesafetensors

    Safetensors can be unpacked, manipulated separately on tensors and metadata, and packed back up, just like an archive.

    Packer usage:

    python sft_pack.py [-h] [-o OUTPUT] input

    where input is safetensors file, and output is directory name (optional).

    Unpacker usage:

    sft_unpack.py [-h] input

    where input is directory structure

    Attachments