RuntimeError: Input type (CPUBFloat16Type) and weight type (torch.DoubleTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

RuntimeError: Input type (CPUBFloat16Type) and weight type (torch.DoubleTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
Traceback (most recent call last):
File “/home/user/.local/lib/python3.8/site-packages/gradio/routes.py”, line 275, in run_predict
output = await app.blocks.process_api(
File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 760, in process_api
result = await self.call_function(fn_index, inputs, iterator)
File “/home/user/.local/lib/python3.8/site-packages/gradio/blocks.py”, line 671, in call_function
prediction = await anyio.to_thread.run_sync(
File “/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py”, line 31, in run_sync
return 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_thread
return await future
File “/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py”, line 867, in run
result = context.run(func, *args)
File “app.py”, line 118, in predict
images = 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_context
return func(*args, **kwargs)
File “/home/user/app/inpainting.py”, line 97, in call
init_latent_dist = self.vae.encode(init_image).latent_dist
File “/home/user/.local/lib/python3.8/site-packages/diffusers/models/vae.py”, line 549, in encode
h = self.encoder(x)
File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_impl
return forward_call(*input, **kwargs)
File “/home/user/.local/lib/python3.8/site-packages/diffusers/models/vae.py”, line 117, in forward
sample = self.conv_in(sample)
File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1130, in _call_impl
return forward_call(*input, **kwargs)
File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py”, line 457, in forward
return self._conv_forward(input, self.weight, self.bias)
File “/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py”, line 453, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (CPUBFloat16Type) and weight type (torch.DoubleTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor