vladmandic/sdnext

[Feature]: stable code api for batch processing

Ouverte

#528 ouverte le 26 avr. 2023

 (5 commentaires) (0 réaction) (0 personne assignée)Python (578 forks)github user discovery
enhancementhelp wanted

Métriques du dépôt

Stars
 (7 311 étoiles)
Métriques de merge PR
 (Merge moyen 7h 30m) (13 PRs mergées en 30 j)

Description

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

Guide contributeur