From 70c75ffd462f51bc4d7992abd8950d003a795ed9 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 11 Aug 2024 02:36:24 +0000 Subject: [PATCH 1/4] Update web_search.md SearXNG --- docs/tutorial/web_search.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/tutorial/web_search.md b/docs/tutorial/web_search.md index 9cf8662..3beed30 100644 --- a/docs/tutorial/web_search.md +++ b/docs/tutorial/web_search.md @@ -5,11 +5,15 @@ title: "Web Search" # Web Search +## Overview + +This guide provides instructions on how to set up web search capabilities in Open WebUI using various search engines. + ## SearXNG (Docker) -This guide outlines how to connect SearXNG to Open WebUI for web search capabilities. +SearXNG is a metasearch engine that aggregates results from multiple search engines. -### 1. Searxng Configuration +### 1. SearXNG Configuration Create a folder named `searxng` in the same directory as your compose files. This folder will contain your Searxng configuration files. Refer to the [Searxng documentation](https://docs.searxng.org/) for configuration instructions. @@ -150,9 +154,15 @@ You can run SearXNG directly using `docker run`: docker run -d --name searxng -p 8080:8080 -v ./searxng:/etc/searxng --restart always searxng/searxng:latest ``` -### 4. GUI configuration +### 4. GUI Configuration + +1. Navigate to: `Admin Panel` -> `Settings` -> `Web Search` +2. Toggle `Enable Web Search` +3. Set `Web Search Engine` from dropdown menu to `searxng` +4. Set `Searxng Query URL` to examples given: `https:///search?q=` or `http:///search?q=`. **Do note the `/search?q=` part is mandatory.** +5. Adjust the `Search Result Count` and `Concurrent Requests` values accordingly +6. Save changes -Navigate to **Admin Settings > Web Search**: ![SearXNG GUI Configuration](/img/tutorial_searxng_config.png) ### 5. Using Web Search in a Chat @@ -165,12 +175,14 @@ Here you can toggle Web Search On/Off. #### Note -You will have to expicitly toggle this On/Off in a chat. +You will have to explicitly toggle this On/Off in a chat. This is enabled on a per session basis eg. reloading the page, changing to another chat will toggle off. ## Google PSE API +### Setup + 1. Go to Google Developers, use [Programmable Search Engine](https://developers.google.com/custom-search), and log on or create account. 2. Go to [control panel](https://programmablesearchengine.google.com/controlpanel/all) and click `Add` button 3. Enter a search engine name, set the other properties to suit your needs, verify you're not a robot and click `Create` button. @@ -178,7 +190,7 @@ This is enabled on a per session basis eg. reloading the page, changing to anoth 5. With `API key` and `Search engine ID`, open `Open WebUI Admin panel` and click `Settings` tab, and then click `Web Search` 6. Enable `Web search` and Set `Web Search Engine` to `google_pse` 7. Fill `Google PSE API Key` with the `API key` and `Google PSE Engine Id` (# 4) -8. click `Save` +8. Click `Save` ![Open WebUI Admin panel](../../static/img/tutorial_google_pse1.png) @@ -195,7 +207,7 @@ Search the web ;-) ## Brave API -### Docker Compose Setup +### Docker Compose Setup Add the following to a file named `docker-compose.yaml`: From 5750e72f54ba13cf9fd57e2bc8bfef653de2fb2e Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 11 Aug 2024 03:00:56 +0000 Subject: [PATCH 2/4] Update images.md Update ComfyUI doc --- docs/tutorial/images.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index f0a3af8..c2d48a6 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -55,7 +55,7 @@ ComfyUI provides an alternative interface for managing and interacting with imag ### Configuring Open WebUI -1. In Open WebUI, navigate to the **Admin Panel** > **Settings** > **Images** menu. +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: ``` @@ -63,6 +63,38 @@ ComfyUI provides an alternative interface for managing and interacting with imag ``` Set the environment variable `COMFYUI_BASE_URL` to this address to ensure proper integration. +## 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. +``` + +**Important Notes:** + +* Flux mode has a completely different workflow that is not compatible with other models. Make sure you understand the implications before enabling it. +* A recent version of ComfyUI is required. +* Specific model checkpoints and files must be present in your ComfyUI installation. + +### Model Checkpoints and Files + +The following files are required for Flux mode: + +* Model checkpoints (sft extension) in both `models/checkpoints` and `models/unet` directories. You can download the Flux variant 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.sft` in the `models/vae` directory. Download from [here](https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors). + +**Additional Requirements:** + +* 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). + ## 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. From c969450d2dfec093d094a346f7113a4a406730a2 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 11 Aug 2024 03:15:31 +0000 Subject: [PATCH 3/4] Update images.md --- docs/tutorial/images.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index c2d48a6..c4b6e97 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -62,6 +62,7 @@ ComfyUI provides an alternative interface for managing and interacting with imag http://:8188/ ``` Set the environment variable `COMFYUI_BASE_URL` to this address to ensure proper integration. +4. Verify the connection. ## 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: From d6c89dcb2f8d0b04a22b8bb034597396d8c4ae65 Mon Sep 17 00:00:00 2001 From: silentoplayz <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 11 Aug 2024 03:17:00 +0000 Subject: [PATCH 4/4] Update images.md --- docs/tutorial/images.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorial/images.md b/docs/tutorial/images.md index c4b6e97..7a2944e 100644 --- a/docs/tutorial/images.md +++ b/docs/tutorial/images.md @@ -63,6 +63,7 @@ ComfyUI provides an alternative interface for managing and interacting with imag ``` Set the environment variable `COMFYUI_BASE_URL` to this address to ensure proper integration. 4. Verify the connection. +5. Save changes. ## 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: