Vista icon indicating copy to clipboard operation
Vista copied to clipboard

How to convert bin to safetensors when I reload the original safetensors

Open JunyuanDeng opened this issue 1 year ago • 10 comments

I am now try to train the stage 2 with the provided vista.safetensors.

After training, I merged the partitioned checkpoints as pytorch_model.bin using zero_to_fp32.py and while I use bin_to_st.py to convert the resulting, an error occur:

Traceback (most recent call last): File "/home/users/junyuan.deng/Programmes/Vista/bin_to_st.py", line 31, in vista_bin[pretrain_k] = vista_bin[pretrain_k] + lora_weights KeyError: '_forward_module.model.diffusion_model.input_blocks.1.1.transformer_blocks.0.attn1.to_q.weight'

What's this problem and how to solve it?

JunyuanDeng avatar Jul 01 '24 04:07 JunyuanDeng

Or is it possible to release the bin file after the training of first stage?

JunyuanDeng avatar Jul 01 '24 07:07 JunyuanDeng

I had same issue.

shengcheng avatar Jul 19 '24 00:07 shengcheng

I had same issue.

I find the issue. The code does not save the weights of the diffusion model untrained.

shengcheng avatar Jul 19 '24 18:07 shengcheng

Same issue here. Seems that the saved checkpoint has no keys starting with '_forward_module.model.diffusion_model.input_blocks.' and including 'to_q' 'to_k' 'to_v'

ljb121002 avatar Jul 20 '24 11:07 ljb121002

I had same issue.

I find the issue. The code does not save the weights of the diffusion model untrained.

I had a similar issue here. Do you know how to fix it?

DYZhang09 avatar Sep 04 '24 09:09 DYZhang09

I had the same issue. @Little-Podi Hi, could you take a look at this issue?

zhoujiawei3 avatar Nov 17 '24 05:11 zhoujiawei3

Just need to load the unsaved weight from the official offered checkpoint

zhoujiawei3 avatar Nov 19 '24 08:11 zhoujiawei3

I had same issue. I think the bin_to_st.py file have some bugs.
https://github.com/OpenDriveLab/Vista/blob/6ff19b805c646e050414567425728aac4257d767/bin_to_st.py#L31 The pytorch_model.bin file doesn't have keys like '_forward_module.model.diffusion_model.input_blocks.1.1.transformer_blocks.0.attn1.to_q.weight' or ...to_k.weight or ...to_v.weight Can you tell us how to fix it? @Little-Podi

Yang-Jianzhang avatar Dec 09 '24 12:12 Yang-Jianzhang

Same question, have you solved it?

johnren-code avatar Jun 09 '25 06:06 johnren-code

Thanks for the great work! Any update on this? @Little-Podi

FrankBu-TRI avatar Aug 06 '25 22:08 FrankBu-TRI