Lora模型加載時出錯
使用SD-WebUI加載Lora的時候,有些lora加載會出問題,在后臺會又如下錯誤:
第一種情況
很久以前也遇到過同樣的問題,當時時調整了main.py中的兩行代碼,如下:
但是這種方法,可能會在自動更新之后失效。
參考鏈接:https://www.reddit.com/r/StableDiffusion/comments/13tzwrf/
第二種情況
可能是因為在后來在使用lora的時候沒有注意到后臺的輸出,一直沒有再關心過這個問題,但是有一次再civitai上看到一張?zhí)貏e好看的圖,想著復刻一下,又發(fā)現(xiàn)了lora模型出錯的問題:
這次是直接更新了locon插件,更新完畢之后就可以正常使用了。
但同時,還發(fā)現(xiàn)了其他的問題,使用SD-WebUI安裝的插件,基本上來自于碼云,使用locon的時候一般是需要安裝兩個插件的,如下:
如此看來,我之前安裝的就是有問題的,調整成新安裝的這倆插件使用上是沒有問題的。
參考鏈接:https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/10030

關于這幾個項目,我直接把GitHub上的描述翻譯過來,放在這里,方便后續(xù)查閱和理解。
關于a1111-sd-webui-lycoris
An extension for loading lycoris model in sd-webui. I made this stand alone extension (Use sd-webui's extra networks api) to avoid some conflict with other loras extensions.
我制作了這個獨立的擴展(使用 sd-webui 的額外網(wǎng)絡 api)以避免與其他 loras 擴展發(fā)生沖突。
關于LyCORIS
A project for implementing different algorithm to do parameter-efficient finetuning on stable diffusion or more.This project is started from LoCon(see archive branch).
一個用于實現(xiàn)不同算法以對穩(wěn)定擴散或更多進行參數(shù)有效微調的項目。這個項目是從 LoCon 開始的(參見存檔分支)。
關于a1111-sd-webui-locon
This extension is basically deprecated and will not have any official update at all. Please consider to use?a1111-sd-webui-lycoris?instead?(but if there are new PRs, I will accept them)?If you meet any problem or error when using this extension, please consider remove it and install lycoris extension.
該擴展基本上已被棄用,并且根本不會有任何官方更新。請考慮使用a1111-sd-webui-lycoris代替(但如果有新的PR,我會接受它們)如果您在使用此擴展時遇到任何問題或錯誤,請考慮刪除它并安裝lycoris擴展。
備注
有的時候,僅僅是因為后臺的輸出,作為新手并不能之后是那里的問題,這是一方面;另一方面,還是要緊跟AI時代的浪潮,了解基礎的AI概念,多做筆記,緊跟更新。
筆記中可能會有疏漏、錯誤、誤導等,如果閱讀的時候發(fā)現(xiàn)了,可以直接卸載評論區(qū),我盡快調整。