mirror of
https://github.com/open-webui/docs
synced 2025-05-20 11:18:42 +00:00
3.9 KiB
3.9 KiB
sidebar_position | title |
---|---|
3 | Image Generation |
Image Generation
Open WebUI supports image generation through three backends: AUTOMATIC1111, ComfyUI, and OpenAI DALL·E. This guide will help you set up and use either of these options.
AUTOMATIC1111
Open WebUI supports image generation through the AUTOMATIC1111 API. Here are the steps to get started:
Initial Setup
- Ensure that you have AUTOMATIC1111 installed.
- Launch AUTOMATIC1111 with additional flags to enable API access:
./webui.sh --api --listen
- For Docker installation of WebUI with the environment variables preset, use the following command:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -e AUTOMATIC1111_BASE_URL=http://host.docker.internal:7860/ -e ENABLE_IMAGE_GENERATION=True -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Configuring Open WebUI
- In Open WebUI, navigate to the Admin Panel > Settings > Images menu.
- Set the
Image Generation Engine
field toDefault (Automatic1111)
. - In the API URL field, enter the address where AUTOMATIC1111's API is accessible:
If you're running a Docker installation of Open WebUI and AUTOMATIC1111 on the same host, usehttp://<your_automatic1111_address>:7860/
http://host.docker.internal:7860/
as your address.
ComfyUI
ComfyUI provides an alternative interface for managing and interacting with image generation models. Learn more or download it from its GitHub page. Below are the setup instructions to get ComfyUI running alongside your other tools.
Initial Setup
- Download and extract the ComfyUI software package from GitHub to your desired directory.
- To start ComfyUI, run the following command:
For systems with low VRAM, launch ComfyUI with additional flags to reduce memory usage:python main.py
python main.py --lowvram
- For Docker installation of WebUI with the environment variables preset, use the following command:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -e COMFYUI_BASE_URL=http://host.docker.internal:7860/ -e ENABLE_IMAGE_GENERATION=True -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Configuring Open WebUI
- In Open WebUI, navigate to the Admin Panel > Settings > Images menu.
- Set the
Image Generation Engine
field toComfyUI
. - In the API URL field, enter the address where ComfyUI's API is accessible:
Set the environment variablehttp://<your_comfyui_address>:8188/
COMFYUI_BASE_URL
to this address to ensure proper integration.
OpenAI DALL·E
Open WebUI also supports image generation through the OpenAI DALL·E APIs. This option includes a selector for choosing between DALL·E 2 and DALL·E 3, each supporting different image sizes.
Initial Setup
- Obtain an API key from OpenAI.
Configuring Open WebUI
- In Open WebUI, navigate to the Admin Panel > Settings > Images menu.
- Set the
Image Generation Engine
field toOpen AI (Dall-E)
. - Enter your OpenAI API key.
- Choose the DALL·E model you wish to use. Note that image size options will depend on the selected model:
- DALL·E 2: Supports
256x256
,512x512
, or1024x1024
images. - DALL·E 3: Supports
1024x1024
,1792x1024
, or1024x1792
images.
- DALL·E 2: Supports
Using Image Generation
- First, use a text generation model to write a prompt for image generation.
- After the response has finished, you can click the Picture icon to generate an image.