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

Double wildcard manager tab bug when installed with replacer extension #765

Open
rltgjqmcpgjadyd opened this issue Apr 18, 2024 · 7 comments

Comments

@rltgjqmcpgjadyd
Copy link

rltgjqmcpgjadyd commented Apr 18, 2024

스크린샷 2024-04-18 114407

webui 1.9.0

Enable only two extensions sd-dynamic-prompts & sd-webui-replacer

I've confirmed this doesn't happen with other extensions

I don't know which extension is the problem

See also #481

@light-and-ray
Copy link

I can't see why my extension can affects on other extension's on tab callback. Also I don't see it among your tabs in the screenshot

@rltgjqmcpgjadyd
Copy link
Author

I can't see why my extension can affects on other extension's on tab callback. Also I don't see it among your tabs in the screenshot

you don't see the replacer tab because I don't have enabled segment-anything

스크린샷 2024-04-18 140129

Enable segment-anything like this and you'll see the tab

@light-and-ray
Copy link

light-and-ray commented Apr 18, 2024

I add my second tab here https://github.com/light-and-ray/sd-webui-replacer/blob/375e20260e2b9fbdba21a816679f65af07e3f0ec/scripts/replacer_main_ui.py#L37 but it's on dedicated page. Maybe this extension has a kind of onAfterComponent callbacks, which listens all new tabs. I can reproduce this error, but I don't have any other ideas

@Tillerz
Copy link

Tillerz commented Apr 24, 2024

I can confirm this bug for https://github.com/vladmandic/automatic - shows the tab twice.

image

@Tillerz
Copy link

Tillerz commented Apr 24, 2024

See a fix suggestion by vladmantic here: https://discord.com/channels/1101998836328697867/1199450263556198492/1202268975288045578

sd_dynmic_prompts/dynamic_prompting.py

        global loaded_count
        loaded_count += 1
        if loaded_count % 2 == 0:
            return

this code needs to be removed and do things right
also, we have THREE tabs, txt2img/img2img/control, so this will ALWAYS load two copies as only one is skipped.
at the very least, do this:

        if loaded_count > 0:
            return
        loaded_count += 1

it still uses silly hack, but at least math is not wrong

@light-and-ray
Copy link

light-and-ray commented Apr 24, 2024

if loaded_count % 2 == 0:

Nice vladmandic style 👍 What happens if the bug happens 3 or more times...

The idea is okay. But better to make global bool variable, set it on initialization, and reset it on unload callback

@Tillerz
Copy link

Tillerz commented May 12, 2024

Whatever, someone just fix it. :P

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