diff --git a/backend/apps/images/main.py b/backend/apps/images/main.py index a3939d206..5f7ce388b 100644 --- a/backend/apps/images/main.py +++ b/backend/apps/images/main.py @@ -35,8 +35,8 @@ from config import ( ENABLE_IMAGE_GENERATION, AUTOMATIC1111_BASE_URL, COMFYUI_BASE_URL, - OPENAI_API_BASE_URL, - OPENAI_API_KEY, + IMAGE_OPENAI_API_BASE_URL, + IMAGE_OPENAI_API_KEY, ) @@ -58,8 +58,8 @@ app.add_middleware( app.state.ENGINE = "" app.state.ENABLED = ENABLE_IMAGE_GENERATION -app.state.OPENAI_API_BASE_URL = OPENAI_API_BASE_URL -app.state.OPENAI_API_KEY = OPENAI_API_KEY +app.state.OPENAI_API_BASE_URL = IMAGE_OPENAI_API_BASE_URL +app.state.OPENAI_API_KEY = IMAGE_OPENAI_API_KEY app.state.MODEL = "" diff --git a/backend/config.py b/backend/config.py index 199037e4f..4d05a001e 100644 --- a/backend/config.py +++ b/backend/config.py @@ -487,6 +487,10 @@ AUTOMATIC1111_BASE_URL = os.getenv("AUTOMATIC1111_BASE_URL", "") COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "") +IMAGE_OPENAI_API_BASE_URL = os.getenv("IMAGE_OPENAI_API_BASE_URL", OPENAI_API_BASE_URL) +IMAGE_OPENAI_API_KEY = os.getenv("IMAGE_OPENAI_API_KEY", OPENAI_API_KEY) + + #################################### # Audio ####################################