BLIP-Diffusion: Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing
Model card for BLIP-Diffusion, a text to image Diffusion model which enables zero-shot subject-driven generation and control-guided zero-shot generation.
The abstract from the paper is:
Subject-driven text-to-image generation models create novel renditions of an input subject based on text prompts. Existing models suffer from lengthy fine-tuning and difficulties preserving the subject fidelity. To overcome these limitations, we introduce BLIP-Diffusion, a new subject-driven image generation model that supports multimodal control which consumes inputs of subject images and text prompts. Unlike other subject-driven generation models, BLIP-Diffusion introduces a new multimodal encoder which is pre-trained to provide subject representation. We first pre-train the multimodal encoder following BLIP-2 to produce visual representation aligned with the text. Then we design a subject representation learning task which enables a diffusion model to leverage such visual representation and generates new subject renditions. Compared with previous methods such as DreamBooth, our model enables zero-shot subject-driven generation, and efficient fine-tuning for customized subject with up to 20x speedup. We also demonstrate that BLIP-Diffusion can be flexibly combined with existing techniques such as ControlNet and prompt-to-prompt to enable novel subject-driven generation and editing applications.
The model is created by Dongxu Li, Junnan Li, Steven C.H. Hoi.
Blip-Diffusion learns a
pre-trained subject representation
. uch representation aligns with text embeddings and in the meantime also encodes the subject appearance. This allows efficient fine-tuning of the model for high-fidelity subject-driven applications, such as text-to-image generation, editing and style transfer.
To this end, they design a two-stage pre-training strategy to learn generic subject representation. In the first pre-training stage, they perform multimodal representation learning, which enforces BLIP-2 to produce text-aligned visual features based on the input image. In the second pre-training stage, they design a subject representation learning task, called prompted context generation, where the diffusion model learns to generate novel subject renditions based on the input visual features.
To achieve this, they curate pairs of input-target images with the same subject appearing in different contexts. Specifically, they synthesize input images by composing the subject with a random background. During pre-training, they feed the synthetic input image and the subject class label through BLIP-2 to obtain the multimodal embeddings as subject representation. The subject representation is then combined with a text prompt to guide the generation of the target image.
The architecture is also compatible to integrate with established techniques built on top of the diffusion model, such as ControlNet.
They attach the U-Net of the pre-trained ControlNet to that of BLIP-Diffusion via residuals. In this way, the model takes into account the input structure condition, such as edge maps and depth maps, in addition to the subject cues. Since the model inherits the architecture of the original latent diffusion model, they observe satisfying generations using off-the-shelf integration with pre-trained ControlNet without further training.
Citation
BibTeX:
If you find this repository useful in your research, please cite:
@misc{li2023blipdiffusion,
title={BLIP-Diffusion: Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing},
author={Dongxu Li and Junnan Li and Steven C. H. Hoi},
year={2023},
eprint={2305.14720},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Runs of ModelsLab blipdiffusion on huggingface.co
3
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
2
30-day runs
More Information About blipdiffusion huggingface.co Model
blipdiffusion huggingface.co is an AI model on huggingface.co that provides blipdiffusion's model effect (), which can be used instantly with this ModelsLab blipdiffusion model. huggingface.co supports a free trial of the blipdiffusion model, and also provides paid use of the blipdiffusion. Support call blipdiffusion model through api, including Node.js, Python, http.
blipdiffusion huggingface.co is an online trial and call api platform, which integrates blipdiffusion's modeling effects, including api services, and provides a free online trial of blipdiffusion, you can try blipdiffusion online for free by clicking the link below.
ModelsLab blipdiffusion online free url in huggingface.co:
blipdiffusion is an open source model from GitHub that offers a free installation service, and any user can find blipdiffusion on GitHub to install. At the same time, huggingface.co provides the effect of blipdiffusion install, users can directly use blipdiffusion installed effect in huggingface.co for debugging and trial. It also supports api for free installation.