tencent-ailab / IP-Adapter
- среда, 23 августа 2023 г. в 00:00:11
The image prompt adapter is designed to enable a pretrained text-to-image diffusion model to generate images with image prompt.
we present IP-Adapter, an effective and lightweight adapter to achieve image prompt capability for the pre-trained text-to-image diffusion models. An IP-Adapter with only 22M parameters can achieve comparable or even better performance to a fine-tuned image prompt model. IP-Adapter can be generalized not only to other custom models fine-tuned from the same base model, but also to controllable generation using existing controllable tools. Moreover, the image prompt can also work well with the text prompt to accomplish multimodal image generation.
you can download models from here. To run the demo, you should also download the following models:
Best Practice
scale=1.0
and text_prompt=""
(or some generic text prompts, e.g. "best quality", you can also use any negative text prompt). If you lower the scale
, more diverse images can be generated, but they may not be as consistent with the image prompt.scale
to get the best results. In most cases, setting scale=0.5
can get good results. For the version of SD 1.5, we recommend using community models to generate good images.If you find IP-Adapter useful for your research and applications, please cite using this BibTeX:
@article{ye2023ip-adapter,
title={IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Models},
author={Ye, Hu and Zhang, Jun and Liu, Sibo and Han, Xiao and Yang, Wei},
booktitle={arXiv preprint arxiv:2308.06721},
year={2023}
}