I’m just trying the basics from the diffusers readme. Not sure if the install on my machine is somehow horked but every time I try the basic script I get this error the error below.
I’ve tried different conda environments as well as python 3.8.5 and 3.10 but am stumped.
Exception has occurred: AttributeError
'dict' object has no attribute 'images'
from torch import autocast
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"
with autocast("cuda"):
image = pipe(prompt).images[0]
EDIT
This works.
image = pipe(prompt)["sample"][0]