-
Notifications
You must be signed in to change notification settings - Fork 302
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
Error running on colab webui automatic111 as an extension. #55
Comments
The error states that is_relative_to can't be found. This is a python version problem, that attribute was only added in python 3.9. For local it isn't a problem since 3.10.6 is recommended for the webui, but it seems Colab is running 3.7.x by default, which I wasn't aware of. You can technically change the version since you have full access to the instance Debian backend, but it seems pretty annoying to do. One workaround is the option used in #45, which I originally didn't want to use, but now that I know it's needed on colab maybe I should use it after all or add a version check / fallback to it. |
Wow lol you are right, I forgot about the python version requirment. Thanks, I managed to get around it somehow. By the way I was looking at the code and looking at what that was trying to do. a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py Lines 7 to 24 in 372a499
From what I can see line 8-24 is trying to get the tags base path. I was looking through what the scripts.basedir() does in the documentation(code) from automatic111webui and found this. def basedir():
"""returns the base directory for the current script. For scripts in the main scripts directory,
this is the main directory (where webui.py resides), and for scripts in extensions directory
(ie extensions/aesthetic/script/aesthetic.py), this is extension's directory (extensions/aesthetic)
"""
return current_basedir I might be wrong but doesn't both of these produce the same result without the check? import os
def get_tags_base_path():
return os.path.join(scripts.basedir(), "tags") (I have not tested the code)Anyways thanks for the help. |
Huh I actually never thought about that, since it wasn't mentioned in the Wiki about extension development. |
You were correct, this makes the whole check unnecessary. Thanks for the pointer! |
Quick Description how I got this error.
I installed this as instructed in the readme as an extension. Then once the webui is in final stages of loading up this error pops up. (note that the webui still functions and I can produce images, just the extention keeps spitting out errors constantly, the error following is the first error I get").
Error Log
Error loading script: tag_autocomplete_helper.py
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/scripts.py", line 168, in load_scripts
exec(compiled, module.dict)
File "/content/stable-diffusion-webui/extensions/tag-autocomplete/scripts/tag_autocomplete_helper.py", line 24, in
TAGS_PATH = get_tags_base_path()
File "/content/stable-diffusion-webui/extensions/tag-autocomplete/scripts/tag_autocomplete_helper.py", line 18, in get_tags_base_path
if (script_path.is_relative_to(EXT_PATH)):
AttributeError: 'PosixPath' object has no attribute 'is_relative_to'
My guess on what this could be
Looking at the error message I think the issue is script_path is not initialized. I looked at the code and the following is where its initialized.
a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py
Lines 16 to 18 in 372a499
The text was updated successfully, but these errors were encountered: