RuntimeError: Unexpected ASGI message 'websocket.close', after sending 'websocket.close'
Task exception was never retrievedfuture: <Task finished name=‘Task-75’ coro=<Queue.process_event() done, defined at /home/user/.local/lib/python3.8/site-packages/gradio/queue.py:222> exception=RuntimeError(“Unexpected ASGI message ‘websocket.close’, after sending ‘websocket.close’.”)>Traceback (most recent call last):File “/home/user/.local/lib/python3.8/site-packages/gradio/queue.py”, line 275, in process_eventawait event.disconnect()File “/home/user/.local/lib/python3.8/site-packages/gradio/queue.py”, line 305, in disconnectawait self.websocket.close(code=code)File “/home/user/.local/lib/python3.8/site-packages/starlette/websockets.py”, line 180, in closeawait self.send(File “/home/user/.local/lib/python3.8/site-packages/starlette/websockets.py”, line 85, in sendawait self._send(message)File “/home/user/.local/lib/python3.8/site-packages/uvicorn/protocols/websockets/websockets_impl.py”, line 316, in asgi_sendraise RuntimeError(msg % message_type)RuntimeError: Unexpected ASGI message ‘websocket.close’, after sending ‘websocket.close’.‘’'---------------------------Traceback (most recent call last):File “/home/user/.local/lib/python3.8/site-packages/gradio/routes.py”, line 275, in run_predictoutput = await app.blocks.process_api(File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 760, in process_apiresult = await self.call_function(fn_index, inputs, iterator)File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 671, in call_functionprediction = await anyio.to_thread.run_sync(File “/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py”, line 31, in run_syncreturn await get_asynclib().run_sync_in_worker_thread(File “/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py”, line 937, in run_sync_in_worker_threadreturn await futureFile “/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py”, line 867, in runresult = context.run(func, *args)File “app.py”, line 170, in predictimages = pipe(prompt = prompt, init_image=init_image, mask_image=mask, strength=0.8)[“sample”]File “/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py”, line 27, in decorate_contextreturn func(*args, **kwargs)File “/home/user/app/inpainting.py”, line 97, incallinit_latent_dist = self.vae.encode(init_image).latent_distFile “/home/user/.local/lib/python3.8/site-packages/diffusers/models/vae.py”, line 549, in encodeh = self.encoder(x)File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_implreturn forward_call(*input, **kwargs)File “/home/user/.local/lib/python3.8/site-packages/diffusers/models/vae.py”, line 121, in forwardsample = down_block(sample)File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_implreturn forward_call(*input, **kwargs)File “/home/user/.local/lib/python3.8/site-packages/diffusers/models/unet_blocks.py”, line 708, in forwardhidden_states = resnet(hidden_states, temb=None)File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_implreturn forward_call(*input, **kwargs)File “/home/user/.local/lib/python3.8/site-packages/diffusers/models/resnet.py”, line 359, in forwardhidden_states = self.norm1(hidden_states)File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_implreturn forward_call(*input, **kwargs)File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/normalization.py”, line 272, in forwardreturn F.group_norm(File “/home/user/.local/lib/python3.8/site-packages/torch/nn/functional.py”, line 2516, in group_normreturn torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)RuntimeError: expected scalar type BFloat16 but found Half