vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.43k stars 395 forks source link

[Feature]: Support batch processing with xyz grid and higher batch sizes #1525

Open OtokoNoIzumi opened 1 year ago

OtokoNoIzumi commented 1 year ago

Issue Description

When attempting to substitute the prompt words with an XYZ grid and processing a batch of images, I observe that only a single batch is saved in the output directory. Specifically:

  1. I prepared 5 input images in the batch directory using the "from image" mode: aquaboost, greenboost, originboost, purpleboost, redboost.
  2. The batch count was set to 2.
  3. The xyz grid (S&R) was configured as fire, water, wind, ice. Upon executing the batch run, I expected to obtain 5 2 4= 40 results. However, in reality, aquaboost, greenboost, originboost, purpleboost, and redboost only yielded one result each, and all of them appeared to be the fire version.

Btw, for every batch procedure, SD reloads two control nets and consumes time. How can I adjust my configuration to speed up this process?

Version Platform Description

22:35:21-365540 INFO Python 3.10.11 on Windows 22:35:21-406613 INFO Version: 4867dafa Fri Jun 23 08:00:51 2023 -0400 22:35:23-404799 INFO Latest published version: c80b1ebc367ff4296406abc2004f6a7ab23671d0 2023-06-27T14:28:47Z 22:35:23-410799 INFO nVidia CUDA toolkit detected 22:35:24-413003 INFO Torch 2.0.0+cu118 22:35:24-423006 INFO Torch backend: nVidia CUDA 11.8 cuDNN 8700 22:35:24-425005 INFO Torch detected GPU: NVIDIA GeForce RTX 3080 VRAM 10240 Arch (8, 6) Cores 68 22:35:24-565574 INFO Enabled extensions-builtin: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR', 'Lora', 'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding', 'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'sd-webui-model-converter', 'seed_travel', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR'] 22:35:24-571573 INFO Enabled extensions: ['Auto-Photoshop-StableDiffusion-Plugin'] 22:35:24-573573 INFO No changes detected: Quick launch active 22:35:24-578573 INFO Extension preload: 0.0s E:\SD_Vlad_automatic\extensions-builtin 22:35:24-579573 INFO Extension preload: 0.0s E:\SD_Vlad_automatic\extensions 22:35:24-591573 INFO Server arguments: [] No module 'xformers'. Proceeding without it. 22:35:28-821650 INFO Libraries loaded 22:35:28-824650 INFO Using data path: E:\SD_Vlad_automatic 22:35:28-829503 INFO Available VAEs: E:\SD_Vlad_automatic\models\VAE 3 22:35:28-837502 INFO Available models: E:\SD_Vlad_automatic\models\Stable-diffusion 12 22:35:30-767617 INFO ControlNet v1.1.227 ControlNet v1.1.227

Acknowledgements

vladmandic commented 1 year ago

combining process batch plus batch size plus xyz grid can lead to that as each has its own iterator. definitely doable, but this is more of a feature request than anything. i'm open to prs, otherwise, i'm putting it on backlog.