-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingstaleIssues that haven't received updatesIssues that haven't received updates
Description
Describe the bug
When run following code to try stable diffusion v1.5,
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained(
"local_project_path/stable-diffusion-v1-5",
torch_dtype=torch.float16, revision="fp16"
)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0] I got the error
File "{conda_env_path}/lib/python3.9/site-packages/transformers/models/clip/modeling_clip.py", line 260, in forward
attn_output = torch.bmm(attn_probs, value_states)
RuntimeError: expected scalar type Half but found Float
Reproduction
No response
Logs
No response
System Info
diffusersversion: 0.6.0- Platform: Linux-4.4.0-31-generic-x86_64-with-glibc2.27
- Python version: 3.9.11
- PyTorch version (GPU?): 1.12.0 (True)
- Huggingface_hub version: 0.10.1
- Transformers version: 4.20.1
- Using GPU in script?:
- Using distributed or parallel set-up in script?:
bonlime
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleIssues that haven't received updatesIssues that haven't received updates