-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[Feature Request]: Extentions can't use A1111 modules in correct way #15697
Comments
my guess is that your current work directory is not at webui root for a test modify
to env['PYTHONPATH'] = f"{os.path.dirname(os.path.dirname(__file__))}{os.pathsep}{env.get('PYTHONPATH', '')}"
and if it's this case I think this is more of a user instance configuration error webui is build on the assumption that the cwd is webui root if this is fixed is applied they might still be other issues as they might be other places in code that makes the assumption that cwd is webui root |
Thanks for you're recommend @w-e-w . I created a pull request #15704 for this issue. In some cases, for example when A1111 uses in dependencies of another project ( for example get access to A1111 by API in replicate/cog) user isn't in A1111 root directory. User uses A1111 from another project root and needs to install some extensions that uses A1111 modules. that cases that extensions like ControlNet fail in installation process. |
Is there an existing issue for this?
What would your feature do ?
There is a complete conversation in Mikubill/sd-webui-controlnet#2836 issue and Mikubill/sd-webui-controlnet#2839 pull request on ControlNet repo. Implementation of launch_utils.run_extension_installer can be better. but that can effect All other extensions installation.
stable-diffusion-webui/modules/launch_utils.py
Lines 227 to 240 in 1c0a0c4
I know that
relative import beyond the top-level package
in python not allowed. but I think with a better implementation of this function (which I don't know how to do that) we can help extension contributors think about something else.Proposed workflow
relative import beyond the top-level package
problem.Additional information
this can help extensions for better contribution to project.
The text was updated successfully, but these errors were encountered: