You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to modify the code for gradio, so that more than 1 image could be uploaded for upscaling, so to automate upscaling a batch file, instead of uploading one by one?
Reacted by Alessandro Smedile, Marvin Baumann, Nur, E2GO and InternalDay
Yes, this would be possible. Feel free to contribute and create a PR.
You can use https://www.gradio.app/docs/file with file_count = 'multiple' and iterate over the list of files to create an upscaling AsyncJob for each.
I tried in various ways (files and zip), but the uploaded images or zip file are not recognized. Does Gradio even allow for uploading multiple images or a zip file?
Please also adjust the single image processing into a foreach loop logic for upscaling. This is currently not implemented, as, you guessed it, only single images are processed.
You will have to trigger multiple upscale jobs though, one for each image.
A reference is the A1111 Extras tab, where exactly this has already been implemented (also in Gradio).
Since Fooocus makes so many of the operations so much easier than A1111, it would be great to have Fooocus have this autoscaling feature with a user set maximum pixel size for the longest side of an image.
In addition, would it be possible to also have a batch mode allowing the user to browse for both an input and and output folder.
I have added this feature but I am not experienced with making pull requests and interacting with the repo. If someone wants to add the changes and create a pull request, here is the updated webui.py. For those interested, just backup your existing file and use this one. https://gist.github.com/MMFJ/fab678c086761ac2906343337f6c5bb0
Activity
tralala87 commentedon Dec 17, 2023
Anybody? :)
mashb1t commentedon Dec 29, 2023
Yes, this would be possible. Feel free to contribute and create a PR.
You can use https://www.gradio.app/docs/file with file_count = 'multiple' and iterate over the list of files to create an upscaling AsyncJob for each.
tralala87 commentedon Dec 31, 2023
I tried in various ways (files and zip), but the uploaded images or zip file are not recognized. Does Gradio even allow for uploading multiple images or a zip file?
mashb1t commentedon Dec 31, 2023
Please also adjust the single image processing into a foreach loop logic for upscaling. This is currently not implemented, as, you guessed it, only single images are processed.
You will have to trigger multiple upscale jobs though, one for each image.
A reference is the A1111 Extras tab, where exactly this has already been implemented (also in Gradio).
mashb1t commentedon Dec 31, 2023
Please also see #1664 where others are currently working on implementing a prompt queue.
mashb1t commentedon Jan 10, 2024
Ideas from #1853 by @drdancm:
dkutz78 commentedon Mar 12, 2024
I would also like an option to upscale multiple files. How can this be achieved? Can I edit the Gradio UI somehow?
mashb1t commentedon Mar 12, 2024
@dkutz78 see #1236 (comment), not only UI changes are needed here.
dkutz78 commentedon Mar 12, 2024
Thanks for the quick response. Since I have no coding experience I think it's above my pay grade(io) so to speak. but thanks anyway....
MMFJ commentedon Jun 11, 2025
I have added this feature but I am not experienced with making pull requests and interacting with the repo. If someone wants to add the changes and create a pull request, here is the updated webui.py. For those interested, just backup your existing file and use this one.
https://gist.github.com/MMFJ/fab678c086761ac2906343337f6c5bb0