DiffSynth-Studio icon indicating copy to clipboard operation
DiffSynth-Studio copied to clipboard

关于lora模型的使用,还有是否支持正常使用sdxl

Open lmpeng12 opened this issue 1 year ago • 5 comments

作者您好,请问如何使用lora模型?我这边尝试在diffutoon_toon_shading.py中,添加了lora模型models/lora/HWmakeup.safetensors,并且设置为1,提示词也用了lora:HWmakeup:1.0,但是感觉没有什么效果?

lmpeng12 avatar Mar 06 '24 09:03 lmpeng12

非常抱歉,由于开源的 lora 模型格式比较乱,我现在还做不到都兼容;对于目前兼容的 lora 模型,lora 权重需要单独传入,参考 https://github.com/Artiprocher/DiffSynth-Studio/blob/main/diffsynth/pipelines/stable_diffusion_video.py#L272

Artiprocher avatar Mar 20 '24 09:03 Artiprocher

非常抱歉,由于开源的 lora 模型格式比较乱,我现在还做不到都兼容;对于目前兼容的 lora 模型,lora 权重需要单独传入,参考 https://github.com/Artiprocher/DiffSynth-Studio/blob/main/diffsynth/pipelines/stable_diffusion_video.py#L272

能给一个例子吗,怎么看当前支持的lora呢

jianbo-chen avatar Mar 20 '24 11:03 jianbo-chen

非常抱歉,由于开源的 lora 模型格式比较乱,我现在还做不到都兼容;对于目前兼容的 lora 模型,lora 权重需要单独传入,参考 https://github.com/Artiprocher/DiffSynth-Studio/blob/main/diffsynth/pipelines/stable_diffusion_video.py#L272

哦哦,好的,谢谢。我当时也是只测试这个lora模型,发觉权重调了也没有起作用,而且debug的时候显示有加载模型,如果作者大大有可以使用的方便的时候分享一下

lmpeng12 avatar Mar 20 '24 11:03 lmpeng12

非常抱歉,由于开源的 lora 模型格式比较乱,我现在还做不到都兼容;对于目前兼容的 lora 模型,lora 权重需要单独传入,参考 https://github.com/Artiprocher/DiffSynth-Studio/blob/main/diffsynth/pipelines/stable_diffusion_video.py#L272

哦哦,好的,谢谢。我当时也是只测试这个lora模型,发觉权重调了也没有起作用,而且debug的时候显示有加载模型,如果作者大大有可以使用的方便的时候分享一下

作者您好,vae模型的话,是否就传入模型的时候,直接自己设计一个读取规则后在encoder和decoder的两个model中去加载就可以了?这两个model的显示权重加载正确

lmpeng12 avatar Mar 26 '24 03:03 lmpeng12

Has anyone resolved this issue? I also want to use the Lora model, but I'm not sure if it's working correctly. From what I can see in the code for DiffSynth-Studio/diffsynth/models/__init__.py, it seems like the Lora model is being added to the text_encoder and unet in load_sd_lora. Is it not functioning properly?

nimamura avatar Jul 05 '24 07:07 nimamura