mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
* doc update: stable_diffusion.md update docker specific instruction for Stable Diffusion * doc update: .env.example * Update README.md update sponsors list * Update stable_diffusion.md * Update stable_diffusion.md * Update stable_diffusion.md * Update .env.example * Update docker-compose.yml * Update .env.example
66 lines
2.3 KiB
Markdown
66 lines
2.3 KiB
Markdown
# Stable Diffusion Plugin
|
|
|
|
To use Stable Diffusion with this project, you will need to download and install [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
|
|
|
|
- Note: you need a compatible GPU. Nvidia is recommended, but there is no clear resource on incompatible GPUs. Any decent GPU should work.
|
|
|
|
## 1. Follow download and installation instructions from [stable-diffusion-webui readme](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
|
|
|
|
## 2. Edit your run script settings
|
|
|
|
### Windows
|
|
|
|
- Edit your **webui-user.bat** file by adding the following line before the call command:
|
|
- `set COMMANDLINE_ARGS=--api`
|
|
|
|
- Your .bat file should like this with all other settings default
|
|
```shell
|
|
@echo off
|
|
|
|
set PYTHON=
|
|
set GIT=
|
|
set VENV_DIR=
|
|
set COMMANDLINE_ARGS=--api
|
|
|
|
call webui.bat
|
|
```
|
|
### Others (not tested but should work)
|
|
|
|
- Edit your **webui-user.sh** file by adding the following line:
|
|
- `export COMMANDLINE_ARGS="--api"`
|
|
|
|
- Your .sh file should like this with all other settings default
|
|
```bash
|
|
|
|
export COMMANDLINE_ARGS="--api"
|
|
|
|
#!/bin/bash
|
|
#########################################################
|
|
# Uncomment and change the variables below to your need:#
|
|
#########################################################
|
|
|
|
# ...rest
|
|
```
|
|
|
|
## 3. Run Stable Diffusion (either .sh or .bat file according to your operating system)
|
|
|
|
## 4. In the app, select the plugins endpoint, open the plugins store, and install Stable Diffusion
|
|
### **Note: The default port for Gradio is `7860`. If you changed it, please update the value accordingly.**
|
|
### Docker Install
|
|
- Use `SD_WEBUI_URL=http://host.docker.internal:7860` in the `.env` file
|
|
- Or `http://host.docker.internal:7860` from the webui
|
|
### Local Install
|
|
- Use `SD_WEBUI_URL=http://127.0.0.1:7860` in the `.env` file
|
|
- Or `http://127.0.0.1:7860` from the webui
|
|
|
|

|
|

|
|
|
|
|
|
## 5. Select the plugin and enjoy!
|
|
|
|

|
|
|
|
---
|
|
|
|
## [Go Back to ReadMe](../../../README.md)
|