Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: mat1 and mat2 must have the same dtype #40

Open
kritiro17 opened this issue Jul 5, 2023 · 1 comment
Open

RuntimeError: mat1 and mat2 must have the same dtype #40

kritiro17 opened this issue Jul 5, 2023 · 1 comment

Comments

@kritiro17
Copy link

changing setting sd_model_checkpoint to v2-1_768-ema-pruned.safetensors [dcd690123c]: RuntimeError
Traceback (most recent call last):
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\shared.py", line 597, in set
self.data_labels[key].onchange()
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\call_queue.py", line 15, in f
res = func(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\webui.py", line 225, in
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_models.py", line 539, in reload_model_weights
checkpoint_config = sd_models_config.find_checkpoint_config(state_dict, checkpoint_info)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_models_config.py", line 106, in find_checkpoint_config
return guess_model_config_from_state_dict(state_dict, info.filename)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_models_config.py", line 81, in guess_model_config_from_state_dict
elif is_using_v_parameterization_for_sd2(sd):
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_models_config.py", line 61, in is_using_v_parameterization_for_sd2
out = (unet(x_test, torch.asarray([999], device=device), context=test_cond) - x_test).mean().item()
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 797, in forward
h = module(h, emb, context)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 84, in forward
x = layer(x, context)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 334, in forward
x = block(x, context=context[i])
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 269, in forward
return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\util.py", line 121, in checkpoint
return CheckpointFunction.apply(func, len(inputs), *args)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\autograd\function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\util.py", line 136, in forward
output_tensors = ctx.run_function(*ctx.input_tensors)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 274, in _forward
x = self.ff(self.norm3(x)) + x
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 76, in forward
return self.net(x)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
input = module(input)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\extensions-builtin\Lora\lora.py", line 400, in lora_Linear_forward
return torch.nn.Linear_forward_before_lora(self, input)
File "F:\AI\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\torch\nn\modules\linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 must have the same dtype

Is there anything wrong with my setting? Thanks

@tjohn88
Copy link

tjohn88 commented May 22, 2024

I have the same issue. My videocard is 3060 12Gb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants