Running stable-diffusion-2-1 example code got error:OverflowError: cannot fit 'int' into an index-sized integer

#96
by BeyondStreamlit - opened

running this code, get error:OverflowError: cannot fit 'int' into an index-sized integer, my platform is windows 11, 256GB RAM, RTX4090
Anyone know why and how to solve this problem?
Code:
import torch
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler

model_id = "stabilityai/stable-diffusion-2-1"

Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead

pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]

image.save("astronaut_rides_horse.png")

hi do you have any updates to this? I am running into the same issue here

Sign up or log in to comment