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

During file naming, seed number not incremented with batch count #35

Closed
graemeniedermayer opened this issue Dec 1, 2022 · 1 comment

Comments

@graemeniedermayer
Copy link
Contributor

graemeniedermayer commented Dec 1, 2022

Actual behaviour
For instance with the prompt building, with a batch count of 2, you'll get output names like:
00675-1600648804-building.png
00676-1600648805-building.png

00677-1600648804-building_depth.png
00678-1600648804-building_depth.png

Expected behaviour
So the 1600648804 in the second depth image name should be incremented by 1. This can be a bit a frustration when creating similar depth maps because the numbering is the same. This also makes it so the depth image won't give the correct information to png_info.

Some of the observations I've made
processed.seed that is used during saving seems to be only the initial seed. There should have some sort of n_iter or batch count index added to it. It would be nice to do something like processed.seed + processed.n_iter ; however, n_iter isn't attached to processed.

Possible solution
Changing processed.seed to processed.all_seeds[count-1] does seem to work. I haven't tested it for every situation.

@thygate
Copy link
Owner

thygate commented Dec 2, 2022

Yes, that's definitely a bug, thanks for catching this !

p.n_iter is available, but the processed.all_seeds[count-1] seems like the correct solution, -1 to compensate for the initial grid image..

edit: p.n_iter holds the total batch count, so not useful. I will do the same for prompts, change to processed.all_prompts[count-1]

also changed info = create_infotext(p, p.all_prompts, p.all_seeds, p.all_subseeds, "", 0, count-1)

verified correct seeds are now saved in the filename and png_info.

edit2: this works, even when generating one image, because [-1] returns the last element in python.

@thygate thygate closed this as completed Dec 2, 2022
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

No branches or pull requests

2 participants