[FIX] The diffusion pipeline returned dtype error
Browse filesDue to `torch_dtype = torch.float16` the pipeline returned error `RuntimeError: mat1 and mat2 must have the same dtype`
Cause the dtype of tensor and models layer dtype didn't match. [link_to_issue](https://discuss.pytorch.org/t/runtimeerror-mat1-and-mat2-must-have-the-same-dtype/166759)
README.md
CHANGED
@@ -38,7 +38,7 @@ pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
|
|
38 |
"runwayml/stable-diffusion-v1-5",
|
39 |
controlnet=controlnet,
|
40 |
safety_checker=None,
|
41 |
-
torch_dtype=torch.
|
42 |
)
|
43 |
|
44 |
pipe.enable_xformers_memory_efficient_attention()
|
|
|
38 |
"runwayml/stable-diffusion-v1-5",
|
39 |
controlnet=controlnet,
|
40 |
safety_checker=None,
|
41 |
+
torch_dtype=torch.float32
|
42 |
)
|
43 |
|
44 |
pipe.enable_xformers_memory_efficient_attention()
|