Unverified Commit 0407c3e7 authored by Lucca Zenóbio's avatar Lucca Zenóbio Committed by GitHub
Browse files

Fix pipeline class on README (#3345)

Update README.md
parent 7ce3fa01
...@@ -1274,11 +1274,11 @@ mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data ...@@ -1274,11 +1274,11 @@ mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data
init_image = download_image(img_url).resize((512, 512)) init_image = download_image(img_url).resize((512, 512))
mask_image = download_image(mask_url).resize((512, 512)) mask_image = download_image(mask_url).resize((512, 512))
mask_image = PIL.ImageOps.invert(mask_image) mask_image = PIL.ImageOps.invert(mask_image)
pipe = DiffusionPipeline.from_pretrained( pipe = StableDiffusionPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16, custom_pipeline="stable_diffusion_repaint", "CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16, custom_pipeline="stable_diffusion_repaint",
) )
pipe.scheduler = RePaintScheduler.from_config(pipe.scheduler.config) pipe.scheduler = RePaintScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda") pipe = pipe.to("cuda")
prompt = "Face of a yellow cat, high resolution, sitting on a park bench" prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0] image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0]
``` ```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment