CogVideo icon indicating copy to clipboard operation
CogVideo copied to clipboard

ValueError: text_encoder is not found in self._lora_loadable_modules=['transformer'].使用load_cogvideo_lora.py加载lora并推理报这个错误

Open schhaohao opened this issue 2 years ago • 4 comments

System Info / 系統信息

Uploading image.png…

Information / 问题信息

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

Reproduction / 复现过程

1

Expected behavior / 期待表现

1

schhaohao avatar Sep 24 '24 14:09 schhaohao

@schhaohao, please provide further information how you fixed this, I am running into the same error.

cdalinghaus avatar Sep 26 '24 07:09 cdalinghaus

please provide further information how you fixed this, I am running into the same error.

haofengl avatar Oct 01 '24 07:10 haofengl

You can skip the text encoder part in fuse_lora() in src/diffusers/loaders/lora_base.py like:

for fuse_component in components:
    if fuse_component == 'text_encoder':
    continue

But they should fix their tools/export_sat_lora_weight.py to skip text encoder.

chenshuo20 avatar Oct 01 '24 10:10 chenshuo20

I just commented out the line that throws the error and it seemed to work also

cdalinghaus avatar Oct 01 '24 10:10 cdalinghaus