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

ModuleNotFoundError: No module named 'lora' #18

Closed luochenxi closed 1 year ago

luochenxi commented 1 year ago

File "/stable-diffusion-webui/extensions/a1111-sd-webui-lycoris/scripts/lycoris_script.py", line 4, in import lycoris File "/stable-diffusion-webui/extensions/a1111-sd-webui-lycoris/lycoris.py", line 15, in import lora ModuleNotFoundError: No module named 'lora'

luochenxi commented 1 year ago

I found an easy way to solve this problem: simply change the code in lycoris.py 13 line lora_path = os.path.join(now_dir, '..', '..', 'extensions-builtin/Lora')

to

os.path.join(os.path.dirname(os.path.dirname(now_dir)),'extensions-builtin/Lora')