Diffusion models are trained to map a source distribution (usually, a Gaussian) to a target distribution (say, of natural images). The Gaussian distribution is chosen because it is easy to sample from, and the diffusion process is often guided by a text prompt in order to achieve a specific outcome. A recent line of text-to-image models operates in semantic latent spaces rather than a pixel compression one, so that nearby latents share content rather than appearance, and it is these semantic models that we focus on. Often, the images we want belong to the domain of a specific dataset, such as photographs, anime or paintings, yet sampling still starts from the same Gaussian, which takes neither the prompt nor the dataset into account. We propose a method that generates images more similar to the dataset's domain, in fewer steps, by enhancing the Gaussian using the dataset, and call this approach Retrieval-Seeded Diffusion, or RSD. Specifically, we store a semantic latents dataset of captioned images. Given a new text prompt, we find its nearest neighbours in the text embedding space, use them to retrieve their semantic latent image representation counterparts, and use the mean of the semantic latent image vectors to guide the initial seed for the diffusion model. Relying on a dataset requires no training and a new dataset can always be introduced or updated. Experiments on three frozen semantic backbones, Scale-RAE, SVG-T2I and SeFi-Image, and three retrieved datasets, show that RSD lowers FID to the target dataset in eight of nine settings, by up to 57%, at 6.25x fewer sampling steps, with comparable prompt alignment.
翻译:暂无翻译