Great work!! Can you make them in ".safetensors" versions?

#1
by lucas-ai26 - opened

Great work!! Can you make them in ".safetensors" versions? ".pt" files are dangerous.

Done β€” every matrix is now available as .safetensors, and it is the recommended format.

You were right to ask. These files hold nothing but a few tensors and a handful of scalars, so there was no reason at all to ship a format that runs pickle on open. The scalars now live in the safetensors header and the node converts them back on load.

Reading them needs node v0.1.2: https://github.com/nicolab28/ComfyUI-ClipProj

I have kept the .pt files alongside for now, so that anyone still on an older node has something that works. They will go away in a later release.

If you want to convert matrices of your own, calibration/to_safetensors.py does it and verifies every tensor round-trips before writing anything.

Thanks for the nudge.

lucas-ai26 changed discussion title from Gret work!! Can you make them in ".safetensors" versions? to Great work!! Can you make them in ".safetensors" versions?

Great! Thanks!! Your work is a huge help to the open-source community.

Sign up or log in to comment