-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using lpw_stable_diffusion
pipeline, it passes an invalid combination of arguments into torch.randn
. Problem still persists while using cpu
.
Reproduction
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained('Linaqruf/anything-v3.0', custom_pipeline="lpw_stable_diffusion").to("mps")
image = pipe(
prompt='test',
width=512,
height=512,
num_inference_steps=10,
num_images_per_prompt=3,
generator=[torch.Generator(device="mps").manual_seed(i) for i in range(3)]
).images[0]
Logs
File "/Users/test/.cache/huggingface/modules/diffusers_modules/git/lpw_stable_diffusion.py", line 638, in prepare_latents
latents = torch.randn(shape, generator=generator, device="cpu", dtype=dtype).to(device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: randn() received an invalid combination of arguments - got (tuple, dtype=torch.dtype, device=str, generator=list), but expected one of:
* (tuple of ints size, *, torch.Generator generator, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
* (tuple of ints size, *, torch.Generator generator, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
* (tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
* (tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
System Info
diffusers 0.14.0, pytorch 2.0.0, MacOS M1, python 3.11.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working