Fantasy-Studio/Paint-by-Example
A research implementation of exemplar-based image editing using diffusion models and self-supervised training.

Paint by Example enables users to edit images using a reference exemplar image rather than text prompts. The system leverages diffusion models with an information bottleneck and strong augmentations to disentangle source and exemplar images while avoiding trivial copy-paste solutions. It supports arbitrary shape masks for the exemplar and uses classifier-free guidance to maintain controllability, all within a single forward pass of the diffusion model without iterative optimization.