Skip to content

How to use multiple GPUs

stassius edited this page May 27, 2023 · 1 revision

You can't generate images on multiple GPUs at the moment, but you can create multiple A1111 instances for each GPU you have in your system, and use them for different tasks. For example you can generate on one GPU, upscale on another. This way you can save GPU memory and speed up the work.

In order to do this you have to create a couple of copies of the webui-user.bat (or .sh for Mac and Linux) files and add a CUDA_VISIBLE_DEVICES variable in each of them.

So if you got two GPUs, you can create two files and start two instances of Automatic1111 simultaneously. Their URLs will have different ports.

image image

In Stable Houdini you can switch particular nodes to the Custom URL mode and change the port to the second GPU instance.

image