Pranavv commited on
Commit
6d82175
1 Parent(s): 4ca3cf8

[FIX] The diffusion pipeline returned dtype error

Browse files

Due 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)

Files changed (1) hide show
  1. README.md +1 -1
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.float16
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()