Sygil-Dev / stable-diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seed number is not precise for single txt2img image generated in batch

adamesko opened this issue · comments

When you generate multiple images at once using txt2img with specific seed number, then you can preview them one by one BUT the seed value stored in OUTPUT INFO is the same for all the images, so it's correct only for the first image.

AFAIK If the seed number is e.g. 1000 then it's 1000 for the first image, 1001 for the second image etc.

This fix could really speed up the workflow when working with batch of images.

for me.. correct seed apears in yaml file and the filename.

for me.. correct seed apears in yaml file and the filename.

Lots of us disable the file outputs to save on harddrive space and not have to clear the files constantly when generating a ton of images but then we have the seed issue OP mentioned.

A hypothetical fix for this would be to update output info every time the selected image in the gallery has changed with the proper modified seed (seed + zero indexed image number). Unfortunately Gradio doesn't provide a built in OnChange event for the Gallery the way it has for other input change events. It may be possible to inject custom JS to execute on change though, but requires more work. Alternatively adding that callback as a new PR to Gradio could be a solution.