Fix info alignment in XYZ Grid script #7897
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 relatedall_prompts
,all_seeds
, andinfotexts
lists, causing them to become misaligned. In a separate issue, sub-grids were later injecting into theimages
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