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

[Feature Request]: parallelize batch upscaling

Open kabachuha opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Upscale huge batches of images faster by feeding multiple images to the upscaler nets such as esrgan or swinrl in increased batch sizes directly.

Right now, the upscalers process only a single image at the time and it's a huge loss of time accumulating for large sequences, for example, Deforum's output videos.

For comparison, upscalers eta for ~1 min Deforum videos reaches around 1h, meanwhile Topaz video (where upscalers are obviously parallelized, if not run on multiple gpus) has only ~5 mins.

Proposed workflow

  1. Go to extras/launch upscalers from an extension using scripts api
  2. Select desired params.
  3. Select the batch size that fits in your GPU. (esp with SD unloaded from memory)
  4. Press generate
  5. ...
  6. Profit! The process should be much faster now

Additional information

No response

kabachuha avatar Feb 09 '23 22:02 kabachuha