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

extention stopped working after recent update #158

Closed
Jegantha opened this issue Apr 10, 2023 · 11 comments
Closed

extention stopped working after recent update #158

Jegantha opened this issue Apr 10, 2023 · 11 comments

Comments

@Jegantha
Copy link

Greetings,

Earlier this week I updated automatic1111 for the first time in about two months, and it seems that this extention stopped working. I removed the extention and added it again, but this didn't solve the issue. I've checked the settings and csv files, and those all seem fine.

Does anyone else have similar problems and/or know how to fix this? Thanks.

@DominikDoom
Copy link
Owner

This seems to be a common problem after the big Gradio update the webui recently did, but the current version of tag autocomplete already has the necessary fixes. Similarly to #152 and #157, please make sure you use the most recent version of tag autocomplete and make sure to completely restart the webui after updating/reinstalling, the "Restart UI" button isn't enough in some cases. Also try CTRL+F5 to force a cache refresh.

If this doesn't work, or you've already tried it, the next step would be to look if any javascript errors show up in your browsers console.

@Jegantha
Copy link
Author

Jegantha commented Apr 11, 2023

Hi, thanks for the quick reply.

I never actually saw any errors. It's just that nothing happens anymore when I start typing in my prompt.

I'm not sure how to force it to download the correct version. It shows my current version of the extension as 223abf5 (Wed Apr 5 11:05:44 2023), and neither "check for updates" nor "apply and restart" change that. I think that's the latest version anyway?

I manually downloaded the version 2.1.0 from githun and replaced the javascript, scripts and tags folders. Afterwards I started A1111 again, but to no avail.

@DominikDoom
Copy link
Owner

Are you using any other extensions? If so please try deactivating everything other than this one, just to make sure it's not a compatibility problem. Trying on another browser might be a good check to do as well.

@Renari
Copy link

Renari commented Apr 12, 2023

I ran into this as well:

2023-04-12 17:17:45.402300+00:00ValueError: File cannot be fetched: /stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/javascript/ext_loras.js. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.

Is dumped out in my log for every file from the extension.

Currently installed version: 223abf54

@Renari
Copy link

Renari commented Apr 12, 2023

AUTOMATIC1111/stable-diffusion-webui#7028 upstream issue

My issue was related to symlinks and how gradio changed them.

sed -i 's/in_app_dir = .*/in_app_dir = True/g' /usr/local/lib/python3.10/dist-packages/gradio/routes.py

Is a workaround that will make gradio resolve files in symlinks again.

@DominikDoom
Copy link
Owner

@Renari Yes, as you've already found out this is a gradio issue. Symlinks are more recent, but user files stored outside of the root are a problem since essentially day one. This extension relies heavily on javascript for the browser interaction, which is why it is more affected by this than others who mostly or only use server side python scripts. There are a few closed issues about the same thing here already, and it can also break extensions in Docker containers depending on how they're set up. But sadly if Gradio doesn't change how they handle files not in the root or allow adding exceptions / include paths, this isn't something I can fix.

@Jegantha
Copy link
Author

Even after disabling every other extension it still doesn't work. Using Chrome instead of Firefox also doesn't seem to fix it.

So if I understand it correctly the issue is not directly related tp this extension, so it's not something you can fix? Do you know if completely removing Automatic1111 from my pc and re-installing could be a solution in this case, in case Renari's solution doesn't work for me? Thanks again for all your efforts.

@Renari Where would I need to insert that part of code? I only know some basics and am not too familiar with programming.

AUTOMATIC1111/stable-diffusion-webui#7028 upstream issue

My issue was related to symlinks and how gradio changed them.

sed -i 's/in_app_dir = .*/in_app_dir = True/g' /usr/local/lib/python3.10/dist-packages/gradio/routes.py

Is a workaround that will make gradio resolve files in symlinks again.

@DominikDoom
Copy link
Owner

DominikDoom commented Apr 13, 2023

@Jegantha If you don't see errors in the webui or browser console this error is most likely unrelated to you, it's just another common issue. But it will clearly say something about not being able to load external files and flood the browser console with errors, so it's hard to miss.

EDIT:
It's hard to debug what the issue is on your end without more info, but one thing you could try is entering the following two variables in your browser console of the webui page:
image
These are both pretty central to the script, so it might be a good starting point to see if it got initialized correctly.

Also make sure that the script loading isn't blocked by an adblocker or other browser extension, there was a case before where the Internet Download Manager "Advanced Integration" was blocking requests.

@Jegantha
Copy link
Author

2023-04-13 22_14_59-Greenshot
2023-04-13 22_15_50-Greenshot

All this time I thought ppl were talking about getting errors in the command window of a1111. Turns out I was indeed getting a lot of errors in the console of the browser. Mybad!

The first image has the errors I get upon starting. Whenever I start typing in the prompt window I get several errors like the one in the second image. Does this mean that there is a different solution? I typed the lines you suggested into the console but it's telling me that tagBasePath and CFG are undefined.

@DominikDoom
Copy link
Owner

Yeah it seems the script isn't loaded correctly.
In the first error it says "redeclaration", do you maybe have a duplicate version of the extension that is somehow interfering? The rest of the errors most likely come from these global variables missing as well. Also make sure that you don't have the old legacy version of the script installed (before extensions were a thing), where the files would be dropped off in the webui's root Javascript and scripts folders instead of the extensions subdirectory. Or maybe you put them there recently by mistake?

@Jegantha
Copy link
Author

There was indeed an old version (25/10/22) in the main javascript folder. After removing that file everything works again. Thank you very much! :)

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

3 participants