Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hinablue opened this issue May 7, 2023 · 0 comments
Open

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

hinablue opened this issue May 7, 2023 · 0 comments

Comments

@hinablue
Copy link

hinablue commented May 7, 2023

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

--- extensions/a1111-sd-webui-locon/scripts/main.py     2023-05-03 04:48:01.944314067 +0000
+++ extensions/a1111-sd-webui-locon/scripts/main.path.py        2023-05-03 04:48:34.880357753 +0000
@@ -9,7 +9,7 @@
 from modules import shared, devices, sd_models
 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant