-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
image_to_image.py line 92 throws the error above.
` init_latents = self.scheduler.add_noise(init_latents, noise, timesteps)`
I've tried adding .to(self.device) to the 3 parameters.
Device should be 'cuda' though.
Reproduction
device = "cuda"
pipei2i = StableDiffusionImg2ImgPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
revision="fp16",
torch_dtype=torch.float16,
use_auth_token=True
).to(device)
response = requests.get('https://pbs.twimg.com/media/Fa1_7_vWYAEwfX-.png')
init_image = Image.open(io.BytesIO(response.content)).convert("RGB")
init_image = init_image.resize((512, 512))
init_image = preprocess(init_image)
outputs = pipei2i(prompt=prompt, init_image=init_image, strength=0.75, num_inference_steps=75,guidance_scale=0.75)
Logs
No response
System Info
diffusers==0.2.4
nvidia/cuda:11.3.0-cudnn8-devel-ubuntu20.04
loretoparisi and shaunnarayan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working