stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Xyz order fix

Open DejitaruJin opened this issue 1 year ago • 0 comments

Describe what this pull request is trying to achieve.

X/Y/Z Grid processing is now slightly more efficient, slightly more robust, but moreover, guarantees that sub-images will be displayed and saved in strict X/Y/Z order, even if the option cost forces them to generate in a different order. It will also now, all costs equal, default to generating in X/Y/Z order rather than Z/Y/X.

Relies on/includes PR #7897, partially. Improving on that, sub-grids are now guaranteed to copy their metadata from the relevant x=0,y=0 cell, rather than the first cell generated in the sub-grid.

Somewhat related to #7526, at least in regard to metadata. (Resolving the file names will require discussion and fundamental changes to how processed results are stored and passed.)

Additional notes and description of your changes

image_cache and sub_grids lists have been removed, since the image references in processed_result.images are in a reliable and sequential order.

Please try to break this! It's changed a fair bit of the error handling, but the kinds of errors I usually encounter/know how to reproduce break SD at a deeper level, which this script has never tried to recover from.

Environment this was tested in

List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.

  • OS: Linux Mint 20.3
  • Browser: Firefox
  • Graphics card: Nvidia 1660 Super

Screenshots or videos of your changes

image image image image

DejitaruJin avatar Mar 05 '23 00:03 DejitaruJin