diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index 41e88df5d2..8e62c18a1d 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -3305,7 +3305,7 @@ AUTOMATIC1111_BASE_URL = PersistentConfig( ) AUTOMATIC1111_API_AUTH = PersistentConfig( "AUTOMATIC1111_API_AUTH", - "image_generation.automatic1111.api_auth", + "image_generation.automatic1111.params", os.getenv("AUTOMATIC1111_API_AUTH", ""), ) diff --git a/backend/open_webui/routers/images.py b/backend/open_webui/routers/images.py index 8aabf0f73b..1159dfc576 100644 --- a/backend/open_webui/routers/images.py +++ b/backend/open_webui/routers/images.py @@ -75,7 +75,7 @@ def get_image_model(request): return ( request.app.state.config.IMAGE_GENERATION_MODEL if request.app.state.config.IMAGE_GENERATION_MODEL - else "imagen-3.0-generate-002" + else "gemini-2.5-flash-image" ) elif request.app.state.config.IMAGE_GENERATION_ENGINE == "comfyui": return ( @@ -383,6 +383,7 @@ def get_models(request: Request, user=Depends(get_verified_user)): ] elif request.app.state.config.IMAGE_GENERATION_ENGINE == "gemini": return [ + {"id": "gemini-2.5-flash-image", "name": "Gemini 2.5 Flash Image 🎨 (Recommended)"}, {"id": "imagen-3.0-generate-002", "name": "imagen-3.0 generate-002"}, ] elif request.app.state.config.IMAGE_GENERATION_ENGINE == "comfyui": @@ -635,6 +636,7 @@ async def image_generations( r.raise_for_status() res = r.json() + # print(f"Gemini response: {json.dumps(res, indent=2)[:500]}") images = [] @@ -656,6 +658,7 @@ async def image_generations( request, image_data, content_type, data, user ) images.append({"url": url}) + log.info("Successfully processed image from Gemini response") return images