CogVideo icon indicating copy to clipboard operation
CogVideo copied to clipboard

请问lora微调后的模型无法使用给出的脚本转换成diffusers格式,另外,是否会更新一版只保存lora模型而不是全部保存的版本

Open SCHfighting opened this issue 1 year ago • 1 comments

System Info / 系統信息

Information / 问题信息

  • [X] The official example scripts / 官方的示例脚本
  • [ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

1

Expected behavior / 期待表现

希望lora微调可以只保存lora参数

SCHfighting avatar Aug 13 '24 10:08 SCHfighting

image

For only save lora parameters, you can modify SwissArmyTransformer/sat/training/model_io.py according to image above.

tengjiayan20 avatar Aug 13 '24 16:08 tengjiayan20

image For only save lora parameters, you can modify SwissArmyTransformer/sat/training/model_io.py according to image above.

But this method will drop dit transformer params weights in ckpt. You need to add origin params to new ckpt manually according to the names of lora model's weights, which have been changed when using lora.

tengjiayan20 avatar Aug 25 '24 14:08 tengjiayan20