KohakuBlueleaf / a1111-sd-webui-lycoris

An extension for stable-diffusion-webui to load lycoris models.
Apache License 2.0
861 stars 116 forks source link

Request to fix the import path for build-in lora #27

Closed hinablue closed 1 year ago

hinablue commented 1 year ago

There is the patch sample, using the os.path.abspath for loading build-in lora always work for me.

--- extensions/a1111-sd-webui-lycoris/lycoris.py        2023-05-03 04:52:44.833373518 +0000
+++ extensions/a1111-sd-webui-lycoris/lycoris.patch.py  2023-05-03 04:52:15.677202301 +0000
@@ -11,7 +11,7 @@

 now_dir = os.path.dirname(os.path.abspath(__file__))
 lora_path = os.path.join(now_dir, '..', '..', 'extensions-builtin/Lora')
-sys.path.insert(0, lora_path)
+sys.path.insert(0, os.path.abspath(lora_path))
 import lora
 new_lora = 'lora_calc_updown' in dir(lora)
KohakuBlueleaf commented 1 year ago

oh, actually you can just remove this part, I forgot it. Will update until github resolve their git issue