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

fix batch img2img output dir with script #12926

Merged
merged 3 commits into from
Sep 9, 2023

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Aug 31, 2023

Description

Add opt save_images_add_number_suffix
similar concept to add numbering prefix for image, but only when thre existing a file with the same name
this prevents files from being overwritten

currently for batch img2img the output dir will be ignored when a script such as XYZ is enabled
the image will be I'll put it to the default output
although this is undesirable but it is not catastrophic

using save_images_add_number_suffix this allows the use of original file name when script is used

this fix makes it so that the output directory will be set the they specified directory in batch img2img regardless if a script is enabled or not
if a script is active it will use the default user defined file name pattern for saving images
only when no script is active will the original file name be used as the output file name

the reason why this is done is because if we use the original file names scripts such as Xyz would generate multiple images of the same name and thus overriding previous generated files

not sure but this might be a possible fix for [Bug]: Batch img2img with multiple X/Y/Z denoising values is only saving one image (WebUI 1.6.0)
I do have my doubts because what he is experiencing seems to be different issue
as Sysinfo is not uploaded I wasn't able to conduct further diagnosis

Checklist:

@theunderdowner
Copy link

If you leave the output folder empty it will save to the files to the \outputs\img2img-images\ directory but where they go if you add a directory ????

@AUTOMATIC1111 AUTOMATIC1111 merged commit 329c8ab into dev Sep 9, 2023
6 checks passed
@AUTOMATIC1111 AUTOMATIC1111 deleted the fix-batch-img2img-output-dir-with-script branch September 9, 2023 05:56
AUTOMATIC1111 added a commit that referenced this pull request Sep 9, 2023
@aleksbos
Copy link

aleksbos commented Sep 9, 2023

Replacing the three files presented did not solve the problem. Also, there is a discrepancy between the sources

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