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

Paths not resolving properly with alternate --data-dir #107

Open
Phando opened this issue Sep 1, 2023 · 1 comment
Open

Paths not resolving properly with alternate --data-dir #107

Phando opened this issue Sep 1, 2023 · 1 comment

Comments

@Phando
Copy link

Phando commented Sep 1, 2023

I am running Automatic1111 with an alternate --data-dir setting. May stable diffusion apps (Auto1111 and Comfy) are at C:/genai and my models, extensions and the like are in D:/genai_extras. Data dir is, D:/genai_extras/auto1111. This makes it easy to keep my apps updated without having to rework any customizations. Also it allows for easy sharing of models between the apps. When trying to run ebsynth on a fresh install of Auo1111 I am getting script errors. I think it has to do with the scripts not resolving the root path correctly. Is this something that can be cleared up with venv or do you know a fix for this?

Traceback (most recent call last):
      File "C:\Users\USERNAME\genai\automatic\modules\scripts.py", line 382, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Users\USERNAME\genai\automatic\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\genai_extras\auto1111\extensions\ebsynth_utility\scripts\custom_script.py", line 23, in <module>
        from extensions.ebsynth_utility.calculator import CalcParser,ParseError
    ModuleNotFoundError: No module named 'extensions.ebsynth_utility'
@Phando
Copy link
Author

Phando commented Sep 1, 2023

Adding the following to custom_script.py fixed my error but I don't think it is the right fix. It would be ideal if the custom script could access the --data-dir setting and add that path automatically.

import sys
sys.path.append('D:/genai_extras/auto1111')

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