krita-ai-diffusion
krita-ai-diffusion copied to clipboard
Connection termination problem
We frequently have issues with the Krita Plugin displaying "Connection terminated" when using with our inhouse Krita Server. Using the WebUI, we are not having that issue.
The client.log is not very clear about what is happening there:
2025-09-01 13:44:14,666 ERROR Unhandled exception while processing Job[id=0fc386ff-9a75-442e-a593-09fdbcb7bba7]
Traceback (most recent call last):
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 209, in _run
await self._run_job(job)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 239, in _run_job
raise e
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 232, in _run_job
result = await self._post("prompt", data)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 193, in _post
return await self._requests.post(f"{self.url}/{op}", data)
ai_diffusion.network.NetworkError: Verbindung beendet
2025-09-01 13:44:14,886 ERROR Unhandled exception while processing Job[id=eed89910-6601-43f0-8465-90536c008aa6]
Traceback (most recent call last):
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 209, in _run
await self._run_job(job)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 239, in _run_job
raise e
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 232, in _run_job
result = await self._post("prompt", data)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 193, in _post
return await self._requests.post(f"{self.url}/{op}", data)
ai_diffusion.network.NetworkError: Verbindung beendet
2025-09-01 13:44:15,106 ERROR Unhandled exception while processing Job[id=6bb1a67a-d311-451f-8926-46bfa20bde00]
Traceback (most recent call last):
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 209, in _run
await self._run_job(job)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 239, in _run_job
raise e
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 232, in _run_job
result = await self._post("prompt", data)
File "C:\Users\Cia\AppData\Roaming\krita\pykrita\ai_diffusion\comfy_client.py", line 193, in _post
return await self._requests.post(f"{self.url}/{op}", data)
ai_diffusion.network.NetworkError: Verbindung beendet
There are no related errors in the comfyui.log. We are proxying ComfyUI with Traefik 3.x
i get this also no control nets in flux, illustrious ... press the stars to generate the control seems to stop it for me, never had to do that on sdxl so assume normal step with other models, not tested sdxl as yet. is yours in editing like mine? though id mention it.
@tilllt The plugin / client probably doesn't have any more information. Something is terminating the connection.
Main difference is that the plugin sends images along with the prompt. The web UI uploads them separately. Maybe there's a cap somewhere on how large the payload can be - ComfyUI has one, but it's quite large (100mb or so), proxy might have one. Does it happen with small images?
@tilllt The plugin / client probably doesn't have any more information. Something is terminating the connection.
ComfyUI has one, but it's quite large (100mb or so), proxy might have one. Does it happen with small images?
I think the size of the files doesn't matter. But I will try to check it more systematically. I already raised the response timeout for websocket connections in traefik from default 60s to unlimited, didn't help.
Input images are transferred via HTTP, results come back via websocket.
From the log it looks like HTTP is the issue. Anything interesting in the proxy's logs?
Note: image transfer in v1.41.0 was changed to use separate HTTP PUT/GET reqeusts which send bytes.