512))

pipe = DiffusionPipeline.from_pretrained(
    "Fantasy-Studio/Paint-by-Example",
    torch_dtype=torch.float16,
)
pipe = pipe.to("cuda")

image = pipe(image=init_image, mask_image=mask_image, example_image=example_image).images[0]
image

PaintByExamplePipeline
	

class diffusers.PaintByExamplePipeline

<
source
>
(
vae: AutoencoderKL
image_encoder: PaintByExampleImageEncoder
unet: UNet2DConditionModel
scheduler: typing.Union[diffusers.sc