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

hires button, opt insert gallery #16405

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Aug 18, 2024

Description

add option to insert the resulting images into Gallery as opposed to replace original when using high button to perform upscale

Setting > Gallery > Insert [✨] hires button results to gallery default False

Screenshots/videos:

image


  • as far as I can tell geninfo["infotexts"][gallery_index: gallery_index+1] = processed.infotexts was a line I forgot to when remove when I was working on cfb90a9 luckily it wasn't causing any issues

Checklist:

add option to insert the resulting images into Gallery as opposed to replace original when using high button to perform upscale
@strawberrymelonpanda
Copy link

strawberrymelonpanda commented Aug 20, 2024

Works and appreciated @w-e-w, always wanted to be able to rerun high-res fix with different settings.

One request perhaps: right now seems to select the previous, initial low-res image after the high-res fix, not the new image. Would it be possible to switch to the new image instead?

(The browser I tested with was Chromium)

@w-e-w
Copy link
Collaborator Author

w-e-w commented Aug 20, 2024

Would it be possible to switch to the new image instead?

yes, but unfortunately as we are currently using gradio==3.41.2 and so don't have access to the gallery selected_index argument

this means if we want to change the selected image it would require some messy custom JavaScript and other changes to the codebase then I would like fore this sort of thing

I would rather wait until after we upgread gradio version, which is something that we have been saying for a long time ......


translation: yes it's possible but I'm lazy so I'd rather wait until the built-in tools available then implement my own

@strawberrymelonpanda
Copy link

No worries; makes sense. I think Auto typically prefers fewer JS solutions as well.
It's a nice improvement as-is.

@780ilk8ui9otk
Copy link

Finally waited for this, can you provide this feature for adetailer as well?

@catboxanon
Copy link
Collaborator

Not switching to the new image seems a bit silly.
I think this should be implemented properly when Gradio 4 support is merged (if ever) and not be an option but rather default behavior.

@w-e-w
Copy link
Collaborator Author

w-e-w commented Oct 29, 2024

Not switching to the new image seems a bit silly.

that may be doable with JavaScript (if you know how feel free to add it)
but it's still better than nothing I guess

I think this should be implemented properly when Gradio 4 support is merged (if ever) and not be an option but rather default behavior.

I wouldn't call this no properly, as it's basically just adding to what we've been doing now
the only thing this really does is just not removing the input image, it's not really adding complexity

and consider this basically no timeline for Gradio 4, and someone did request for the this little future
better not keep them waiting

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

Successfully merging this pull request may close these issues.

4 participants