TRELLIS.2 icon indicating copy to clipboard operation
TRELLIS.2 copied to clipboard

Convert safetensors to ckpt

Open A1ienSword opened this issue 8 months ago • 1 comments

Hello I want to convert safetensors files to ckpt for finetuning. How can i do this? I want to convert safetensors files from https://huggingface.co/microsoft/TRELLIS.2-4B/tree/main/ckpts

A1ienSword avatar Mar 06 '26 10:03 A1ienSword

maybe you don't need to convert, just use "model_ckpt = safetensors.torch.load_file(finetune_ckpt[name], device=str(self.device))" instead of "model_ckpt = torch.load(read_file_dist(finetune_ckpt[name]), map_location=self.device, weights_only=True)" in the trellis2/trainers/basic.py

little-qjw avatar Mar 09 '26 09:03 little-qjw