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

Webui first load problem with scripts #36

Closed
mykeehu opened this issue Feb 14, 2024 · 9 comments
Closed

Webui first load problem with scripts #36

mykeehu opened this issue Feb 14, 2024 · 9 comments

Comments

@mykeehu
Copy link

mykeehu commented Feb 14, 2024

I have the latest version of both the plugin and Webui installed, the error also occurred on Forge. When I open Webui for the first time, the controls are not usable on it. I see this error in the Chrome console:

error running callback ƒ replacerRemoveInpaintDiffMaskUpload() {
    const mask = gradioApp().getElementById('replacer_inpaint_diff_mask_view');
    var imageContainer = mask.getElementsByClassName('image-container')[0];
… : TypeError: Cannot read properties of null (reading 'getElementsByClassName')
    at replacerRemoveInpaintDiffMaskUpload (replacer.js?1707903619.0917509:79:31)
    at executeCallbacks (file=script.js?1702938585.5389194:83:13)
    at MutationObserver.<anonymous> (file=script.js?1702938585.5389194:112:9)

file=script.js?1702938585.5389194:85 error running callback ƒ replacerRemoveInpaintDiffMaskUpload() {
    const mask = gradioApp().getElementById('replacer_inpaint_diff_mask_view');
    var imageContainer = mask.getElementsByClassName('image-container')[0];
… : TypeError: Cannot read properties of null (reading 'getElementsByClassName')
    at replacerRemoveInpaintDiffMaskUpload (replacer.js?1707903619.0917509:79:31)
    at executeCallbacks (file=script.js?1702938585.5389194:83:13)
    at MutationObserver.<anonymous> (file=script.js?1702938585.5389194:112:9)

error running callback ƒ replacerApplyZoomAndPanIntegration () {
    if (typeof window.applyZoomAndPanIntegration === "function") {
        window.applyZoomAndPanIntegration_replacer_mod("#replacer_advanced_options", ["#re… : TypeError: window.applyZoomAndPanIntegration_replacer_mod is not a function
    at replacerApplyZoomAndPanIntegration (replacer.js?1707903619.0917509:66:16)
    at executeCallbacks (file=script.js?1702938585.5389194:83:13)
    at MutationObserver.<anonymous> (file=script.js?1702938585.5389194:112:9)

If I disable the extension, the webui runs fine. But then I get this message in the cmd console:
*** Extension "sd-webui-replacer" requires "sd-webui-segment-anything" which is disabled.
The segment-anything is not disabled, so the reverse would be correct:
*** Extension "sd-webui-replacer" is disabled.

@light-and-ray
Copy link
Owner

If I disable the extension, the webui runs fine. But then I get this message in the cmd console: *** Extension "sd-webui-replacer" requires "sd-webui-segment-anything" which is disabled. The segment-anything is not disabled, so the reverse would be correct: *** Extension "sd-webui-replacer" is disabled.

Fixed in dev:

Do you mean webui can't run completely, or only these js callbacks?

@mykeehu
Copy link
Author

mykeehu commented Feb 14, 2024

Do you mean webui can't run completely, or only these js callbacks?

None of the buttons or lists work, I temporarily refresh the interface with CTRL+F5 and then it should be fine.

light-and-ray added a commit that referenced this issue Feb 14, 2024
@light-and-ray
Copy link
Owner

Thanks for reporting. Committed fix. If the problems are gone, you can close the issue

@light-and-ray
Copy link
Owner

Do you mean webui can't run completely, or only these js callbacks?

None of the buttons or lists work, I temporarily refresh the interface with CTRL+F5 and then it should be fine.

I have the same some times. Unfortunately it's not because these errors. I think it's because gradio wasn't designed for such big apps and a lot of extensions

light-and-ray added a commit that referenced this issue Feb 14, 2024
@mykeehu
Copy link
Author

mykeehu commented Feb 14, 2024

Very interesting. Because there's no script error anymore, it's perfect. However, the loading is still buggy, as if it was stuck with some loader. So the buttons are not usable, and the lists are not updated, just like the Extensions tab doesn't load the items.
Here are the extensions I use, are there any of them that might be incompatible?

image

Update: now there will definitely be some incompatibility with another extension. When I enabled only yours, controlnet and segment-anything, there was no problem. So I'll start testing one by one.
image

@light-and-ray
Copy link
Owner

Yes, need to disable all unused extensions. Also in settings you can hide unused tabs

For me, when this bug happens, I need to reopen the page, not just reload

@mykeehu
Copy link
Author

mykeehu commented Feb 14, 2024

I'm here now, but it's working well for now. As soon as I find out which plug-in it's stuck with, I'll post it here.
image

@mykeehu
Copy link
Author

mykeehu commented Feb 14, 2024

We have the problematic extension. Unfortunately the extension conflicts with Supermerger :(
https://github.com/hako-mikan/sd-webui-supermerger

I tried it on Auto1111 and Forge. Only one of the extensions can be enabled, otherwise the error occurs. Is it calling some function or definition that might be the same? I don't know, unfortunately I am not a programmer. I report the problem to him.

@light-and-ray
Copy link
Owner

I confirm, enabled this, and got this error 😆 But after reopening it fixes. I enable it only if I need merge loras

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

2 participants