Lsmith is a fast StableDiffusionWebUI using high-speed inference technology with TensorRT
- Batch generation
- img2img support
- Clone repository
git clone https://github.com/ddPn08/Lsmith.git
cd Lsmith
git submodule update --init --recursive
- Launch using Docker compose
docker-compose up --build
Data such as models and output images are saved in the docker-data
directory.
There are two types of Dockerfile.
Dockerfile.full | Build the TensorRT plugin. The build can take tens of minutes. |
Dockerfile.lite | Download the pre-built TensorRT plugin from Github Releases. Build times are significantly reduced. |
You can change the Dockerfile to use by changing the value of services.lsmith.build.dockerfile
in docker-compose.yml.
By default it uses Dockerfile.lite
.
- node.js (recommended version is 18)
- pnpm
- python 3.10
- pip
- CUDA
- cuDNN < 8.6.0
- TensorRT 8.5.x
- Clone Lsmith repository
git clone https://github.com/ddPn08/Lsmith.git
cd Lsmith
git submodule update --init --recursive
- Enter the repository directory.
cd Lsmith
- Enter frontend directory and build frontend
cd frontend
pnpm i
pnpm build --out-dir ../dist
- Run launch.sh with the path to libnvinfer_plugin.so in the LD_PRELOAD variable.
ex.)
bash launch.sh --host 0.0.0.0
- node.js (recommended version is 18)
- pnpm
- python 3.10
- pip
- CUDA
- cuDNN < 8.6.0
- TensorRT 8.5.x
- Install nvidia gpu driver
- Instal cuda 11.x (Click here for the official guide)
- Instal cudnn 8.6.0 (Click here for the official guide)
- Install tensorrt 8.5.3.1 (Click here for the official guide)
- Clone Lsmith repository
git clone https://github.com/ddPn08/Lsmith.git
cd Lsmith
git submodule update --init --recursive
- Enter frontend directory and build frontend
cd frontend
pnpm i
pnpm build --out-dir ../dist
- Launch
launch-user.bat
Once started, access <ip address>:<port number>
(ex https://localhost:8000
) to open the WebUI.
First of all, we need to convert our existing diffusers model to the tensorrt engine.
- Click on the "Engine" tab
- Enter Huggingface's Diffusers model ID in
Model ID
(ex:CompVis/stable-diffusion-v1-4
) - Enter your Huggingface access token in
HuggingFace Access Token
(required for some repositories). Access tokens can be obtained or created from this page. - Click the
Build
button to start building the engine.- There may be some warnings during the engine build, but you can safely ignore them unless the build fails.
- The build can take tens of minutes. For reference it takes an average of 15 minutes on the RTX3060 12GB.
- Select the model in the header dropdown.
- Click on the "Generate" tab
- Click "Generate" button.
Special thanks to the technical members of the AI 絵作り研究会, a Japanese AI image generation community.