fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Freezing during image2image

Open alexanderytaylor opened this issue 2 years ago • 9 comments

I keep this error when trying Image2Image on Automatic1111 UI:

Task exception was never retrieved
future: <Task finished coro=<Queue.process_event() done, defined at /usr/local/lib/python3.7/dist-packages/gradio/queue.py:222> exception=RuntimeError("Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 275, in process_event
    await event.disconnect()
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 305, in disconnect
    await self.websocket.close(code=code)
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 181, in close
    {"type": "websocket.close", "code": code, "reason": reason or ""}
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 85, in send
    await self._send(message)
  File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/websockets/websockets_impl.py", line 316, in asgi_send
    raise RuntimeError(msg % message_type)
RuntimeError: Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.

alexanderytaylor avatar Oct 06 '22 03:10 alexanderytaylor

Check the box "use gradio server", then rerun the last cell

TheLastBen avatar Oct 06 '22 04:10 TheLastBen

Still getting an error for image2image on Automatic1111 with "use gradio server" checked

Task exception was never retrieved
future: <Task finished coro=<Queue.process_event() done, defined at /usr/local/lib/python3.7/dist-packages/gradio/queue.py:222> exception=RuntimeError("Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 275, in process_event
    await event.disconnect()
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 305, in disconnect
    await self.websocket.close(code=code)
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 181, in close
    {"type": "websocket.close", "code": code, "reason": reason or ""}
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 85, in send
    await self._send(message)
  File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/websockets/websockets_impl.py", line 316, in asgi_send
    raise RuntimeError(msg % message_type)
RuntimeError: Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.

alexanderytaylor avatar Oct 06 '22 04:10 alexanderytaylor

try a clean install and run

TheLastBen avatar Oct 06 '22 11:10 TheLastBen

Task exception was never retrieved
future: <Task finished coro=<Queue.process_event() done, defined at /usr/local/lib/python3.7/dist-packages/gradio/queue.py:222> exception=RuntimeError("Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 275, in process_event
    await event.disconnect()
  File "/usr/local/lib/python3.7/dist-packages/gradio/queue.py", line 305, in disconnect
    await self.websocket.close(code=code)
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 181, in close
    {"type": "websocket.close", "code": code, "reason": reason or ""}
  File "/usr/local/lib/python3.7/dist-packages/starlette/websockets.py", line 85, in send
    await self._send(message)
  File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/websockets/websockets_impl.py", line 316, in asgi_send
    raise RuntimeError(msg % message_type)
RuntimeError: Unexpected ASGI message 'websocket.close', after sending 'websocket.close'.

Having the same issue here when doing extra image. Happening on both tunnel and gradio servers. Change mode to text2image and it works then change back to extra it happens again.

jcplus avatar Oct 10 '22 04:10 jcplus

I'll check it out

TheLastBen avatar Oct 10 '22 08:10 TheLastBen

same here, any news on this issue?

Maxadox avatar Nov 21 '22 23:11 Maxadox

Exception in thread Thread-17: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/gradio/tunneling.py", line 39, in handler chan.send(data) File "/usr/local/lib/python3.7/dist-packages/paramiko/channel.py", line 801, in send return self._send(s, m) File "/usr/local/lib/python3.7/dist-packages/paramiko/channel.py", line 1198, in _send raise socket.error("Socket is closed") OSError: Socket is closed

Maxadox avatar Nov 22 '22 00:11 Maxadox

Try using the gradio server

TheLastBen avatar Nov 22 '22 07:11 TheLastBen

worked! thanks

Maxadox avatar Nov 24 '22 13:11 Maxadox