Commit c72d8384 authored by Your Name's avatar Your Name

Simplify error message for unsupported image generation models

Change from detailed installation instructions to simple message:
'Model does not support image generation'
parent c792d752
...@@ -3560,17 +3560,9 @@ async def create_image_generation(request: ImageGenerationRequest): ...@@ -3560,17 +3560,9 @@ async def create_image_generation(request: ImageGenerationRequest):
print(f"sd.cpp error: {sd_cpp_error}") print(f"sd.cpp error: {sd_cpp_error}")
# Both backends failed - return error with installation instructions # Both backends failed - return error with installation instructions
error_details = []
if diffusers_error:
error_details.append(f"diffusers: {diffusers_error}")
if sd_cpp_error:
error_details.append(f"sd.cpp: {sd_cpp_error}")
raise HTTPException( raise HTTPException(
status_code=501, status_code=400,
detail=f"Image generation not available. Tried: {', '.join(error_details)}. " detail=f"Model '{model_to_use}' does not support image generation"
f"Install either: pip install diffusers torch accelerate safetensors (for NVIDIA) "
f"or: pip install stable-diffusion-cpp-python (for Vulkan/AMD)"
) )
# ============================================================================= # =============================================================================
# Text-to-Speech Endpoint # Text-to-Speech Endpoint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment