Giter VIP home page Giter VIP logo

Comments (21)

huchenlei avatar huchenlei commented on September 15, 2024

Can you attach console output? Output from both Browser devtools console and WebUI commandline.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

openpose editor problem 4
openpose editor problem 5

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

Can you reveal the DOM structure in devtools? Something like this:
Screenshot (146)

The highlighted element is reported not found in your case according to console output.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

Sorry, I am not sure how to get to the line you are in. openpose editor problem 6

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

Right click on the edit button and select inspect. From there you might want to expand some element to get the state in my screenshot.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

openpose editor problem 7
Look like around here
openpose editor problem 8

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

Hmmm, it seems more complicated.

Can you put some breakpoints like in this screenshot?
Screenshot (147)

I am interested in whether we get the modal in line15. If that is the case, it means the button is present in the DOM, but the modal is not.

Try replace the modal.js with following content to see it solves your issue:

const cnetModalRegisteredElements = new Set();
onUiUpdate(() => {
    // Get all the buttons that open a modal
    const btns = gradioApp().querySelectorAll(".cnet-modal-open");

    // Get all the <span> elements that close a modal
    const spans = document.querySelectorAll(".cnet-modal-close");

    // For each button, add a click event listener that opens the corresponding modal
    btns.forEach((btn) => {
        if (cnetModalRegisteredElements.has(btn)) return;
        const modalId = btn.id.replace('cnet-modal-open-', '');
        const modal = document.getElementById("cnet-modal-" + modalId);
        if (!modal) return;
        btn.addEventListener('click', () => {
            modal.style.display = "block";
        });
        cnetModalRegisteredElements.add(btn);
    });

    // For each <span> element, add a click event listener that closes the corresponding modal
    spans.forEach((span) => {
        if (cnetModalRegisteredElements.has(span)) return;
        cnetModalRegisteredElements.add(span);

        const modal = span.parentNode;
        span.addEventListener('click', () => {
            modal.style.display = "none";
        });
    });
});

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

Tried replace the code. doesn't solve the problem. This is the screenshot.
openpose editor problem 9

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

So after the code change, it stops complaining that the element is not found?
What is the modalId at the breakpoint?

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

The red highlighted error no longer appear in the browser devtools console. I dont know how to get the modalID.... openpose editor problem 10

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

Refresh the page with the devtools open. When the execution is paused at line 13, you should see modalId in the Scope panel on the right.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

openpose editor problem 11

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

Strange. As you just checked, modal0 exists, and here the modalId is 0. Does the function returns at line 14?

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

sorry, how do I check it?

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

You put a breakpoint at line 14, and see whether modal object is null in the scope panel.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

openpose editor problem 12

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

I have no clue why it does not work. In theory if at the time modal is null, next time on UI update, when the modal is present, it will register that callback on the edit button.

It is also very wield why your buttons are not controlled by the CSS. Do you have other extensions/customizations changing the CSS?

I saw in eariler screenshots the style.css is properly loaded, so it should not be CSS not loading.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

I tried to disable all other extensions with only the editor and controlnet active but its still not working. It is also weird that the "close" button (I suppose it is a button), i can't even click on it. It is like it is a text string. The cursor doesn't change when it hover over the text "close". The only button seems to be working is just the JSON button.

from sd-webui-openpose-editor.

huchenlei avatar huchenlei commented on September 15, 2024

So close button also not working under all conditions? That can be really wield as close button's js has been there for a long while. It is bound using gradio _js.

When does this issue start to happen. Is it after a certain ControlNet version? Was the close button working before?

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

openpose editor problem 13
This appears when I try to click the "close" button. Not sure since when it happen. Didn't use much before. But I did try reinstall the both controlnet and editor. But I am not 100% sure how to I uninstall it. Do I just delete the folder in the extension folder? I did that and reinstall from URL. Maybe I try to reinstall everything first.

from sd-webui-openpose-editor.

kendrick0210 avatar kendrick0210 commented on September 15, 2024

Hi, after reinstalling everything, including python, stable diffusion and extensions. Now it works perfectly. Thank you for your patience trying to help me out. Thanks.

from sd-webui-openpose-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.