NickLucche / stable-diffusion-nvidia-docker

GPU-ready Dockerfile to run Stability.AI stable-diffusion model v2 with a simple web interface. Includes multi-GPUs support.
MIT License
359 stars 43 forks source link

DataParallel Multi-GPU support #7

Closed NickLucche closed 2 years ago

NickLucche commented 2 years ago

when -e DEVICES=all or -e DEVICES=0,1.. env args are set, a corresponding number of processes is spawned, one per GPU. Each process handles copying and moving the model to their respective device, allowing even workload split during inference (increase Number of images requested).

NickLucche commented 2 years ago

It also includes improvements to GPU memory usage, removing the nsfw filter network from device when the option is not set