Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JunyuanDeng opened this issue Jul 1, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@JunyuanDeng
Copy link

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
Copy link
Author

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

@shengcheng
Copy link

I had same issue.

@shengcheng
Copy link

I had same issue.

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

@ljb121002
Copy link

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'

@DYZhang09
Copy link

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?

@zhoujiawei3
Copy link

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

@zhoujiawei3
Copy link

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

@Yang-Jianzhang
Copy link

I had same issue.
I think the bin_to_st.py file have some bugs.

vista_bin[pretrain_k] = vista_bin[pretrain_k] + lora_weights

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

@YTEP-ZHI YTEP-ZHI added the bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants