mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 00:32:05 +00:00
Add IMAGE_GENERATION_ENABLED env var
With default of `False`.
This commit is contained in:
parent
9e726a32e6
commit
3b8ea55bc8
@ -29,7 +29,7 @@ import base64
|
||||
import json
|
||||
import logging
|
||||
|
||||
from config import SRC_LOG_LEVELS, CACHE_DIR, AUTOMATIC1111_BASE_URL, COMFYUI_BASE_URL
|
||||
from config import SRC_LOG_LEVELS, CACHE_DIR, IMAGE_GENERATION_ENABLED, AUTOMATIC1111_BASE_URL, COMFYUI_BASE_URL
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -48,7 +48,7 @@ app.add_middleware(
|
||||
)
|
||||
|
||||
app.state.ENGINE = ""
|
||||
app.state.ENABLED = False
|
||||
app.state.ENABLED = IMAGE_GENERATION_ENABLED
|
||||
|
||||
app.state.OPENAI_API_KEY = ""
|
||||
app.state.MODEL = ""
|
||||
|
@ -452,5 +452,8 @@ WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models"
|
||||
# Images
|
||||
####################################
|
||||
|
||||
IMAGE_GENERATION_ENABLED = (
|
||||
os.environ.get("IMAGE_GENERATION_ENABLED", "").lower() == "true"
|
||||
)
|
||||
AUTOMATIC1111_BASE_URL = os.getenv("AUTOMATIC1111_BASE_URL", "")
|
||||
COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "")
|
||||
|
Loading…
Reference in New Issue
Block a user