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 info alignment in XYZ Grid script #7897

Closed
wants to merge 1 commit into from

Conversation

DejitaruJin
Copy link
Contributor

Describe what this pull request is trying to achieve.

Resolve #7804
Fixes issue where the generation data in XYZ Grid does not align with the actual image; due to this, saved images did not have the correct metadata to re-generate them.

Additional notes and description of your changes

XYZ grid script was previously only culling the images property of its base Processed object, but not the related all_prompts, all_seeds, and infotexts lists, causing them to become misaligned. In a separate issue, sub-grids were later injecting into the images list, likewise without adjusting the data lists. I've just made it affect all lists the same way at the same time, and added a dict of lists for sub-grid data. (Oddly, all_prompts seems to include negative prompts as well, despite a separate list existing for that?)

Caveat: Sub-grids will copy the data of the first image generated in them (not always top left!) but for now it's better than just... not.

It's also kind of ugly, but I plan on making more significant changes to this script soon to improve efficiency. For now this fix should stand on its own, and does not seem to have conflict with any other current PR's for the file.

Environment this was tested in

  • OS: Linux
  • Browser: Firefox
  • Graphics card: GeForce 1660 SUPER 6GB

Fixed XYZ Grid script to properly align generation data of sub-images and sub-grids.
@AUTOMATIC1111
Copy link
Owner

i cannot reproduce the problem

@DejitaruJin
Copy link
Contributor Author

Well that is... weird? Looking at the existing code you can see that it's altering the different lists in different ways, there's no mechanism for it to resolve that misalignment introspectively.

@DejitaruJin
Copy link
Contributor Author

As discussed yesterday in Discord, this is still necessary, as the portion implemented only affects when sub-grids are turned off.

@DejitaruJin DejitaruJin mentioned this pull request Mar 5, 2023
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.

[Bug]: X/Y/Z result metadata off by one
2 participants