glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
731 stars 97 forks source link

v1.2.1 experimental gpu option #24

Closed glucauze closed 1 year ago

glucauze commented 1 year ago

This version adds the ability to use the GPU, a setting that can be configured in SD at startup. At the moment, this feature is only compatible with Windows and Linux, since the necessary dependencies for Mac are not included.

--faceswaplab_gpu options in SD args in webui-user.sh or webui-user.bat or on option is SD settings. Please be carefull, it will install onnxruntime-gpu that can mess your dependencies. So know what you are doing. See below for SDNEXT

The model stays loaded in VRAM and won't be unloaded after each use. Right now, I don't know a simple way to do this technically, so it's going to take up space. If your system's VRAM is limited, turning on this option might not be the best idea.

I've also made a change that could have some ripple effects. Before, I was automatically tweaking some detection parameters when loading a second model. That's not possible anymore, so I've moved the control for det_size and det_thresh to the global settings. There is auto_det_size option if you don't want to understand that, but it will take more VRAM.

For SD.Next, install dependencies manually :

on windows :

.\venv\Scripts\activate
cd .\extensions\sd-webui-faceswaplab\
 pip install .\requirements-gpu.txt

I think on a1111, it should be better.

I cannot enable GPU by default since it might break stuff in SDNEXT/A1111 due to numpy dependencies.

glucauze commented 1 year ago

Ok managing dependencies for gpu is really a mess :/

For SD.Next, install dependencies manually :

on windows :

.\venv\Scripts\activate
cd .\extensions\sd-webui-faceswaplab\
 pip install .\requirements-gpu.txt

I think on a1111, it should be better.

I cannot enable GPU by default since it might break stuff in SDNEXT/A1111 due to numpy dependencies.