Generate batches more quickly by chaining together separate webui instances
 
 
Go to file
unknown ec666411b1
ignore backup logs
2024-01-10 03:20:47 -06:00
doc add diagram 2023-03-19 11:20:44 -05:00
scripts introduce 'pixel cap' setting for limiting faster workers in asymmetrical configurations where VRAM exhaustion can be more of an issue. update distribution logic 2024-01-10 03:19:34 -06:00
.gitignore ignore backup logs 2024-01-10 03:20:47 -06:00
README.md Update README.md 2023-09-11 19:09:55 -05:00
install.py improve logging by using rich 2023-05-18 13:13:38 -05:00
preload.py Changes for PR #17. Fix for cn etc. when sending image with no infotext 2023-07-30 17:31:25 -05:00

README.md

stable-diffusion-webui-distributed

This extension enables you to chain multiple webui instances together for txt2img and img2img generation tasks.

There is an emphasis on minimizing the perceived latency/lag of large batch jobs in the main sdwui instance.

alt text
Diagram showing Master/slave architecture of the extension

Contributions and feedback are much appreciated!

Installation

On the master instance:

  • Go to the extensions tab, and swap to the "available" sub-tab. Then, search "Distributed", and hit install on this extension.

On each slave instance:

  • enable the api by passing --api and ensure it is listening by using --listen
  • ensure all of the models, scripts, and whatever else you think you might request from them is present
    Ie. if you're using sd-1.5 on the controlling instance, then the sd-1.5 model should also be present on each slave instance. Otherwise, the remote will fallback to some other model that is present.

if you want to easily sync models between your nodes, you might want to use something like rclone

Tips

  • This is not an always on script, you have to select it in the script dropdown of the tab you are in.
  • If benchmarking fails, try hitting the Redo benchmark button under the script's Util tab.
  • If any remote is taking far too long to returns its share of the batch, you can hit the Interrupt button in the Util tab.

Command-line arguments

--distributed-remotes Enter n pairs of sockets corresponding to remote workers in the form name:address:port (deprecated)
--distributed-skip-verify-remotes Disable verification of remote worker TLS certificates (useful for if you are using self-signed certs like with auto tls-https)
--distributed-remotes-autosave Enable auto-saving of remote worker generations
--distributed-debug Enable debug information