Spaces:
Runtime error
RuntimeError: expected scalar type BFloat16 but found Float
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 112, 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 121, in forward
sample = down_block(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/diffusers/models/unet_blocks.py", line 708, in forward
hidden_states = resnet(hidden_states, temb=None)
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/resnet.py", line 359, in forward
hidden_states = self.norm1(hidden_states)
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/normalization.py", line 272, in forward
return F.group_norm(
File "/home/user/.local/lib/python3.8/site-packages/torch/nn/functional.py", line 2516, in group_norm
return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: expected scalar type BFloat16 but found Float