Files
Auto-GPT/docs/configuration/imagegen.md
Luke 7cd407b7b4 Use modern material theme for docs (#5035)
* Use modern material theme for docs

* Update mkdocs.yml

Added search plugin

Co-authored-by: James Collins <collijk@uw.edu>

* Updating mkdocs material theme config per recommendations to enable all markdown options

* Updated highlight extension settings
and codeblocks throughout the docs to align with mkdocs-material recommendations.

codehilite is deprecated in favor of the highlight extension:
https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#highlight

---------

Co-authored-by: lc0rp <2609411+lc0rp@users.noreply.github.com>
Co-authored-by: James Collins <collijk@uw.edu>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-08-01 10:17:33 -07:00

64 lines
2.0 KiB
Markdown

# 🖼 Image Generation configuration
| Config variable | Values | |
| ---------------- | ------------------------------- | -------------------- |
| `IMAGE_PROVIDER` | `dalle` `huggingface` `sdwebui` | **default: `dalle`** |
## DALL-e
In `.env`, make sure `IMAGE_PROVIDER` is commented (or set to `dalle`):
```ini
# IMAGE_PROVIDER=dalle # this is the default
```
Further optional configuration:
| Config variable | Values | |
| ---------------- | ------------------ | -------------- |
| `IMAGE_SIZE` | `256` `512` `1024` | default: `256` |
## Hugging Face
To use text-to-image models from Hugging Face, you need a Hugging Face API token.
Link to the appropriate settings page: [Hugging Face > Settings > Tokens](https://huggingface.co/settings/tokens)
Once you have an API token, uncomment and adjust these variables in your `.env`:
```ini
IMAGE_PROVIDER=huggingface
HUGGINGFACE_API_TOKEN=your-huggingface-api-token
```
Further optional configuration:
| Config variable | Values | |
| ------------------------- | ---------------------- | ---------------------------------------- |
| `HUGGINGFACE_IMAGE_MODEL` | see [available models] | default: `CompVis/stable-diffusion-v1-4` |
[available models]: https://huggingface.co/models?pipeline_tag=text-to-image
## Stable Diffusion WebUI
It is possible to use your own self-hosted Stable Diffusion WebUI with Auto-GPT:
```ini
IMAGE_PROVIDER=sdwebui
```
!!! note
Make sure you are running WebUI with `--api` enabled.
Further optional configuration:
| Config variable | Values | |
| --------------- | ----------------------- | -------------------------------- |
| `SD_WEBUI_URL` | URL to your WebUI | default: `http://127.0.0.1:7860` |
| `SD_WEBUI_AUTH` | `{username}:{password}` | *Note: do not copy the braces!* |
## Selenium
```shell
sudo Xvfb :10 -ac -screen 0 1024x768x24 & DISPLAY=:10 <YOUR_CLIENT>
```