AttributeError: 'StableDiffusionPipeline' object has no attribute 'to'
when I try to excute the code:from torch import autocastfrom diffusers import StableDiffusionPipelinepipe = StableDiffusionPipeline.from_pretrained(“CompVis/stable-diffusion-v1-4”,use_auth_token=True).to(“cuda”)prompt = “a photo of an astronaut riding a horse on mars”with autocast(“cuda”):image = pipe(prompt)[“sample”][0]image.save(“astronaut_rides_horse.png”)It showed me thatAttributeError: ‘StableDiffusionPipeline’ object has no attribute ‘to’‘pip install --upgrade diffusers’ is not workedwhat should I do to solve this question? is it a version problem?
2022-10-14T04:59:54Z
Might be a version problem?The current release of diffusers (0.5.1) has haduse_auth_token=Trueremoved from all the examples, and for the most part doesn’t useautocastanymore either.ButDiffusionPipeline.to()definitely exists, so I’m not sure why it would tell you it doesn’t.
2023-10-25T06:37:12Z
same problem，have it solved?