From 8fd140ad2726fbb93c777b869e9aef5125a5c700 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Thu, 22 Aug 2024 02:11:53 +0000 Subject: [PATCH 1/3] Update images.md Updoot to ComfyUI installation and Flux guide --- docs/tutorial/images.md | 68 ++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index 2801e122..5e33e2a0 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -53,49 +53,49 @@ ComfyUI provides an alternative interface for managing and interacting with imag 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 +## Setting Up Open WebUI with ComfyUI -1. Navigate to the **Admin Panel** > **Settings** > **Images** menu in Open WebUI. -2. Set the `Image Generation Engine` field to `ComfyUI`. -3. In the API URL field, enter the address where ComfyUI's API is accessible: - ``` - http://:8188/ - ``` - Set the environment variable `COMFYUI_BASE_URL` to this address to ensure proper integration. -4. Verify the connection. -5. Save changes. +### Setting Up Flux.1 Models: + +1. **Model Checkpoints**: + * Download the Flux model(s) from the [black-forest-labs HuggingFace page](https://huggingface.co/black-forest-labs). + * Place the model checkpoint(s) in both the `models/checkpoints` and `models/unet` directories of ComfyUI. +2. **CLIP Model**: + * Download `clip_l.safetensors` from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main). + * Place it in the `models/clip` ComfyUI directory. +3. **T5XXL Model** (optional): + * Download `t5xxl_fp16.safetensors` or `t5xxl_fp8_e4m3fn.safetensors` from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main) + * Place it in the `models/clip` ComfyUI directory. +4. **AE Model**: + * Download `ae.safetensors` from [here](https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors). + * Place it in the `models/vae` ComfyUI directory. -## Configuring for FLUX-Schnell & Flux-Dev models: -To enable ComfyUI Flux mode, add the following environment variables to your Docker-compose.yml file for Open WebUI: -```yaml -COMFYUI_BASE_URL="http://host.docker.internal:8188" -COMFYUI_CFG_SCALE="3.5" -COMFYUI_SAMPLER="euler" -COMFYUI_SCHEDULER="simple" -COMFYUI_SD3="false" -COMFYUI_FLUX="true" # Enables ComfyUI Flux mode. -COMFYUI_FLUX_WEIGHT_DTYPE="fp8_e4m3fn" # Ignored if Flux is not enabled. Sets the weight precision for Flux. -COMFYUI_FLUX_FP8_CLIP="true # Enable 8-bit precision for the Flux text encoder. -``` +To integrate ComfyUI into Open WebUI, follow these steps: -**Important Notes:** +### Step 1: Configure Open WebUI Settings -* Flux mode has a completely different workflow that is not compatible with other models. Make sure you understand the implications before enabling it. -* An updated version of ComfyUI is required. -* Specific model checkpoints and files must be present in your ComfyUI installation. +1. Navigate to the **Admin Panel** in Open WebUI. +2. Click on **Settings** and then select the **Images** tab. +3. In the `Image Generation Engine` field, choose `ComfyUI`. +4. In the **API URL** field, enter the address where ComfyUI's API is accessible, following this format: `http://:8188/`. + - Set the environment variable `COMFYUI_BASE_URL` to this address to ensure it persists within the WebUI. -### Model Checkpoints and Files +### Step 2: Verify the Connection and Enable Image Generation -The following files are required for Flux mode: +1. Ensure ComfyUI is running and verify the connection to Open WebUI. You won't be able to proceed without a successful connection. +2. Once the connection is verified, toggle on **Image Generation (Experimental)**. More options will be presented to you. +3. Continuye to step 3 for the final configuration steps. -* Model checkpoints in both `models/checkpoints` and `models/unet` directories. You can download the Flux model(s) from the [black-forest-labs HuggingFace page](https://huggingface.co/black-forest-labs). -* `clip_l.safetensors` in the `models/clip` directory. Download from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main). -* `t5xxl_fp16.safetensors` in the `models/clip` directory, unless `COMFYUI_FLUX_FP8_CLIP` is enabled. Download from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main). -* `ae.safetensors` in the `models/vae` directory. Download from [here](https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors). +### Step 3: Configure ComfyUI Settings and Import Workflow -**Additional Requirements:** +1. Enable developer mode within ComfyUI. +2. Export the desired workflow from ComfyUI in `API format`. The file will be downloaded as `workflow_api.json` if done correctly. +3. Return to Open WebUI and click the **Click here to upload a workflow.json file** button. +4. Select the `workflow_api.json` file to import. +5. After importing the workflow, you must map the `ComfyUI Workflow Nodes` according to the imported workflow node IDs. Note that some workflows, such as ones that use any of the Flux models, may utilize multiple nodes IDs that is necessary to fill in for their their node entry fields within Open WebUI. If a node entry field requires multiple IDs, the node IDs should be comma separated (e.g. `1` or `1, 2`). +7. Click `Save` to apply the settings and enjoy image generation with ComfyUI integrated into Open WebUI! -* If `COMFYUI_FLUX_FP8_CLIP` is set to `true`, the `t5xxl_fp8_e4m3fn.safetensors` file must exist in the `models/clip` directory. Download from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main). +After completing these steps, your ComfyUI setup should be integrated with Open WebUI, and you can use the Flux.1 models for image generation. ## OpenAI DALLĀ·E From 21c8cbf01909577b0859ded5419df6b25a3870b2 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Thu, 22 Aug 2024 02:20:06 +0000 Subject: [PATCH 2/3] Update images.md Fix --- docs/tutorial/images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index 5e33e2a0..dd4a06a1 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -84,7 +84,7 @@ To integrate ComfyUI into Open WebUI, follow these steps: 1. Ensure ComfyUI is running and verify the connection to Open WebUI. You won't be able to proceed without a successful connection. 2. Once the connection is verified, toggle on **Image Generation (Experimental)**. More options will be presented to you. -3. Continuye to step 3 for the final configuration steps. +3. Continue to step 3 for the final configuration steps. ### Step 3: Configure ComfyUI Settings and Import Workflow From dcb9207008e52acff886a77a91bbae404babbca7 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Thu, 22 Aug 2024 02:22:24 +0000 Subject: [PATCH 3/3] Update images.md Fixes with # --- docs/tutorial/images.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index dd4a06a1..485bf61f 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -53,9 +53,9 @@ ComfyUI provides an alternative interface for managing and interacting with imag 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 ``` -## Setting Up Open WebUI with ComfyUI +### Setting Up Open WebUI with ComfyUI -### Setting Up Flux.1 Models: +#### Setting Up Flux.1 Models: 1. **Model Checkpoints**: * Download the Flux model(s) from the [black-forest-labs HuggingFace page](https://huggingface.co/black-forest-labs). @@ -72,7 +72,7 @@ ComfyUI provides an alternative interface for managing and interacting with imag To integrate ComfyUI into Open WebUI, follow these steps: -### Step 1: Configure Open WebUI Settings +#### Step 1: Configure Open WebUI Settings 1. Navigate to the **Admin Panel** in Open WebUI. 2. Click on **Settings** and then select the **Images** tab. @@ -80,13 +80,13 @@ To integrate ComfyUI into Open WebUI, follow these steps: 4. In the **API URL** field, enter the address where ComfyUI's API is accessible, following this format: `http://:8188/`. - Set the environment variable `COMFYUI_BASE_URL` to this address to ensure it persists within the WebUI. -### Step 2: Verify the Connection and Enable Image Generation +#### Step 2: Verify the Connection and Enable Image Generation 1. Ensure ComfyUI is running and verify the connection to Open WebUI. You won't be able to proceed without a successful connection. 2. Once the connection is verified, toggle on **Image Generation (Experimental)**. More options will be presented to you. 3. Continue to step 3 for the final configuration steps. -### Step 3: Configure ComfyUI Settings and Import Workflow +#### Step 3: Configure ComfyUI Settings and Import Workflow 1. Enable developer mode within ComfyUI. 2. Export the desired workflow from ComfyUI in `API format`. The file will be downloaded as `workflow_api.json` if done correctly.