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

请问如何使用 diffbir v2 中的训练结果进行测试呢 #109

Open
65EE opened this issue Apr 14, 2024 · 1 comment
Open

请问如何使用 diffbir v2 中的训练结果进行测试呢 #109

65EE opened this issue Apr 14, 2024 · 1 comment

Comments

@65EE
Copy link

65EE commented Apr 14, 2024

抱歉问题比较stupid

在 v1 里面可以直接进行替换

--config configs/model/cldm.yaml \
--ckpt weights/general_full_v1.ckpt \

在 v2 train 的train_stage 1 和 train_stage 2 将得到不同的.pt文件,
请问要怎么使用利用 v2训练的到的这两个模型文件应用进行恢复测试呢?

十分感谢,期待您的回复。

@0x3f3f3f3fun
Copy link
Collaborator

你好。为了让用户能够直接运行代码,现在inference.py里加载的权重路径是固定的。对于train_stage1.py训练得到的权重,它只会在训练stage2模型的时候被用到,在inference的时候没啥用。对于train_stage2.py训练得到的权重,得修改一下utils/inference.py中InferenceLoop.init_stage2_model这个函数,让它加载你自己训练的权重,你可以把权重路径当作是程序的参数,然后从self.args中获取这个参数~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants