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

UI option never hidden, always starts out unchecked #53

Open
Black-Platypus opened this issue Dec 20, 2024 · 4 comments
Open

UI option never hidden, always starts out unchecked #53

Black-Platypus opened this issue Dec 20, 2024 · 4 comments

Comments

@Black-Platypus
Copy link

The accordion UI item is never hidden, like the setting "Hide in Txt2Img/Img2Img tab" suggests.
This leads to the menu spawning in unchecked, which has lead to much confusion 😅
I don't know how the UI/Settings system works, but it looks like the settings value for "negpip_hide" is read into opt_hideui, without that variable ever being used.

opt_hideui = getattr(shared.opts,OPT_HIDE, False)

The settings value is queried again only in process_batch.
Also, I can't get the "Toggle startup Active" button to work. I assume the checkbox should start out being checked?

hako-mikan added a commit that referenced this issue Jan 9, 2025
@hako-mikan
Copy link
Owner

Thanks!
It looks like I missed that the visible setting was left out when I approved pull request #45.
Fixed it.

@Black-Platypus
Copy link
Author

The hiding option works now.
However, it always starts off disabled (including when it is hidden); that problem still persists.
Using a fresh install with only NegPiP installed (except for the built-in extensions)

My ui-config.json contains:

    "customscript/negpip.py/txt2img/NegPiP/visible": true,
    "customscript/negpip.py/txt2img/NegPiP/value": false,
    "txt2img/Toggle startup with Active(Now:None)/visible": true,
    "customscript/negpip.py/img2img/NegPiP/visible": true,
    "customscript/negpip.py/img2img/NegPiP/value": null,
    "img2img/Toggle startup with Active(Now:None)/visible": true,
    "customscript/negpip.py/txt2img/Active/value": true,
    "txt2img/Toggle startup with Active(Now:False)/visible": true,
    "txt2img/Toggle startup with Active(Now:True)/visible": true

customscript/negpip.py/txt2img/NegPiP/value always seems to stay false

Does it matter that the caption text is different between

toggle = gr.Button(elem_id="switch_default", value=f"Toggle startup with Active(Now:{startup_i if is_img2img else startup_t})", variant="primary")
and
return gr.update(value = f"Toggle startup Active(Now:{data[key]})")
?
I.e. "Toggle startup [WITH ]Active"?
Does that somehow affect things? I wouldn't think so, but I want to make sure 😅

Capture.2025-01-09.20-50-51.mp4

@hako-mikan
Copy link
Owner

If you hide it, you can turn the functionality on or off in the "Active" setting under Settings.
At this time, all settings on the generation tab will be disabled.

@Black-Platypus
Copy link
Author

No, it always starts out deactivated for me, even when it is hidden and the "Active" setting it set.
Re-toggling the setting, reloading, nothing makes it work

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