Klace / stable-diffusion-webui-instruct-pix2pix

Extension for webui to run instruct-pix2pix
Other
320 stars 20 forks source link

RuntimeError: Input type (float) and bias type (struct c10::Half) should be the same #44

Closed coder168 closed 1 year ago

coder168 commented 1 year ago

Got the following error when click the button "generate" in instruct-pix2pix tab:

Processing 1 image(s) 100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [00:02<00:00, 4.12it/s] Traceback (most recent call last): File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, args) File "D:\app2\stable-diffusion-webui\extensions\stable-diffusion-webui-instruct-pix2pix\scripts\instruct-pix2pix.py", line 284, in generate raise e File "D:\app2\stable-diffusion-webui\extensions\stable-diffusion-webui-instruct-pix2pix\scripts\instruct-pix2pix.py", line 256, in generate x = model.decode_first_stage(z.to(model.first_stage_model.device)) File "D:\app2\stable-diffusion-webui\modules\sd_hijack_utils.py", line 17, in setattr(resolved_obj, func_path[-1], lambda args, kwargs: self(*args, *kwargs)) File "D:\app2\stable-diffusion-webui\modules\sd_hijack_utils.py", line 28, in call return self.__orig_func(args, kwargs) File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, *kwargs) File "D:\app2\stable-diffusion-webui\modules\models\diffusion\ddpm_edit.py", line 776, in decode_first_stage return self.first_stage_model.decode(z) File "D:\app2\stable-diffusion-webui\modules\lowvram.py", line 52, in first_stage_model_decode_wrap return first_stage_model_decode(z) File "D:\app2\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\autoencoder.py", line 89, in decode z = self.post_quant_conv(z) File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(input, **kwargs) File "D:\app2\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 182, in lora_Conv2d_forward return lora_forward(self, input, torch.nn.Conv2d_forward_before_lora(self, input)) File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward return self._conv_forward(input, self.weight, self.bias) File "D:\app2\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (float) and bias type (struct c10::Half) should be the same

System settings:

This extension works before, it seems to be broken by recent updates, I guess.