fastsdcpu icon indicating copy to clipboard operation
fastsdcpu copied to clipboard

Open WebUI only shows URL not image

Open joebiwankenobi opened this issue 1 month ago • 1 comments

Hi I've created 2 x containers in proxmox 1 - Open Webui 2 - FastSDCPU

i've followed the documentation to add FastSD CPU to Open WebUI: a - started ./start-mcpserver.sh b - added server to "External Tools" http://server_ip:8000 (connection successful) c - changed "function calling" to "native" d - enabled the Tool selection in the "send a message" field

when i ask for an image to be created, i get the following:

{ "prompt": "a woman with red hair" } "The generated image available at the URL http://localhost:8000/results/c2ff39c3-e7b3-4c01-966b-5634a997061b-1.jpg"

if i browse to that URL but change the "localhost" to the server IP where FastSD CPU is, i can see the image. how do i make it so that the correct Server IP URL is pulled back?

joebiwankenobi avatar Nov 13 '25 11:11 joebiwankenobi

actually... i've found the fix for this. under /fastsdcpu/src/backend/api/mcp_server.py

change the following field:

# url = request.url_for("results", path=image_names[0]) - Claude D>
url = f"http://localhost:{SERVER_PORT}/results/{image_names[0]}"
image_url = f"The generated image available at the URL {url}"
return image_url

to:

url = f"http://{host}:{SERVER_PORT}/results/{image_names[0]}"

this now works internally and pulls the image back.

i'll now work on getting this working externally

Thank you

joebiwankenobi avatar Nov 13 '25 15:11 joebiwankenobi