vladmandic/sdnext

[Feature]: stable code api for batch processing

オープン

#528 opened on 2023/04/26

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)Python (576 件のフォーク)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (7,312 個のスター)
PR merge metrics
 (平均マージ 7h 30m) (30d で 13 merged PRs)

説明

Feature description

At the moment, the code for img2img batch sequence processing is restricted to this function:

https://github.com/vladmandic/automatic/blob/93b0de7e599453027ad7cab6266b42920ebc1250/modules/img2img.py#L16

And it is impossible to know whether we are in batch mode or not from an extension without resorting to hacks. See for example how it was done for controlnet:

https://github.com/Mikubill/sd-webui-controlnet/blob/93b0f9e1b7cc246165666b7b307bc8243db2c3f4/scripts/batch_hijack.py#L99

Additionally, this batch sequence mode and the "batch count" and "batch size" sliders of the webui can easily be confused with one another.

It would be nice if it was possible for extension scripts to:

  1. know whether they are in sequential batch mode
  2. control whether the current generation is in batch mode, depending on the extension generation parameters (the gradio components returned by the ui() callback)
    • note also that this means extensions would be able to enter batch mode during txt2img generation for example, which is currently not an existing concept in the webui

Providing a unified interface to iterate over multiple images for generation would allow extensions to communicate with each other and make it possible (or at least easier) to create more complex workflows for movie2movie that are currently not possible (or at least hard to implement).

As a side concern: should I open this issue in https://github.com/AUTOMATIC1111/stable-diffusion-webui instead? I am confused as to which repo should receive this kind of code change request.

Version Platform Description

コントリビューターガイド