Spaces:
Sleeping
Sleeping
How to use the second block function?
#2
by
zylj
- opened
I assume the second block is for composition. But it seems didn't interact with the first block.
In other project mask_image used as below. Does somebody actually work, please tell me how to use it.
from diffusers import StableDiffusionInpaintPipeline
pipe = StableDiffusionInpaintPipeline.from_pretrained(
"runwayml/stable-diffusion-inpainting",
revision="fp16",
torch_dtype=torch.float16,
)
prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
#image and mask_image should be PIL images.
#The mask structure is white for inpainting and black for keeping as is
image = pipe(prompt=prompt, image=image, mask_image=mask_image).images[0]
image.save("./yellow_cat_on_park_bench.png")
bump