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

[Bug]: 1.7.0 - use_original_name_batch: breaks gradio gallery #14344

Closed
2 of 6 tasks
light-and-ray opened this issue Dec 17, 2023 · 0 comments
Closed
2 of 6 tasks

[Bug]: 1.7.0 - use_original_name_batch: breaks gradio gallery #14344

light-and-ray opened this issue Dec 17, 2023 · 0 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@light-and-ray
Copy link
Contributor

light-and-ray commented Dec 17, 2023

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

In "Extras"/"Batch Process" tab I process few images. After first run they are processed in gallery. But in further runs (with changed post processing options) they aren't shown in gallery, it shows output from first generation

After exploring 1.7.0 patch, I found it because forced_filename:
modules/postprocessing.py:82

if opts.use_original_name_batch and name is not None:
    basename = os.path.splitext(os.path.basename(name))[0]
    forced_filename = basename + suffix

The files are overridden in output directory by the last generation. And it seems they are not overriden in a kind of cache in gradio. And it shows old files

And I want to say I do not prefer this behavior by default. I would want to save all my files with number in filenames, even if I want to save original filename. Maybe you should add another option for force filenames:

 if opts.use_original_name_batch and name is not None:
     basename = os.path.splitext(os.path.basename(name))[0]
-    forced_filename = basename + suffix
+    if not opts.use_original_name_batch_do_not_override:
+       forced_filename = basename + suffix

Or use use_original_name_batch option only for "batch from dir" tab

@light-and-ray light-and-ray added the bug-report Report of a bug, yet to be confirmed label Dec 17, 2023
@light-and-ray light-and-ray changed the title [Bug]: opts.use_original_name_batch breaks gradio gallery [Bug]: 1.7.0 opts.use_original_name_batch breaks gradio gallery Dec 17, 2023
@light-and-ray light-and-ray changed the title [Bug]: 1.7.0 opts.use_original_name_batch breaks gradio gallery [Bug]: 1.7.0 - use_original_name_batch: breaks gradio gallery Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant