Home

Awesome

PuLID (NeurIPS 2024)

:open_book: PuLID: Pure and Lightning ID Customization via Contrastive Alignment

arXiv xl flux Replicate Replicate<br> Zinan Guo*, Yanze Wu*✝, Zhuowei Chen, Lang Chen, Peng Zhang, Qian He <br> (*Equal Contribution, ✝Corresponding Author) <br> ByteDance Inc <br>

:triangular_flag_on_post: Updates

PuLID for FLUX

Please check the doc and demo of PuLID-FLUX here.

updates

Below results are generated with PuLID-FLUX. pulid_flux_results

Examples

Images generated with our PuLID examples Applications

https://github.com/ToTheBeginning/PuLID/assets/11482921/9bdd0c8a-99e8-4eab-ab9e-39bf796cc6b8

:european_castle: Model Zoo

VersionBase ModelDescription
PuLID-v1SDXLPaper model.
PuLID-v1.1SDXLCompared to PuLID-v1, better compatibility, editability, facial naturalness, and similarity.
PuLID-FLUX-v0.9.0FLUXOur first version for PuLID-FLUX, better prompt-following and image quality (since FLUX is more powerful than SDXL). But ID fidelity is not high enough for some male inputs
PuLID-FLUX-v0.9.1FLUXCompared to PuLID-FLUX-v0.9.0, better ID fidelity. From the quantitative metric of ID similarity, the improvement is about 5 percentage points. Meanwhile, the editability remains similar as before.

:wrench: Dependencies and Installation

# clone PuLID repo
git clone https://github.com/ToTheBeginning/PuLID.git
cd PuLID
# create conda env
conda create --name pulid python=3.10
# activate env
conda activate pulid
# Install dependent packages
# 1. if you don't need flux-fp8, e.g., you are using xl or flux-bf16, install the following requirements.txt
pip install -r requirements.txt
# 2. if you need flux-fp8 (to put flux on consumer-grade gpu), install the following requirements_fp8.txt
pip install -r requirements_fp8.txt

:zap: Quick Inference

Local Gradio Demo

# for v1 version
python app.py

# for v1.1 version
python app_v1.1.py --base BASE_MODEL
Usage:
  -base: can be RunDiffusion/Juggernaut-XL-v9 or Lykon/dreamshaper-xl-lightning

Online HuggingFace Demo

Thanks for the GPU grant from HuggingFace team, you can try PuLID HF demo in

:paperclip: Related Resources

Following are some third-party implementations of PuLID we have found in the Internet. We appreciate the efforts of the respective developers for making PuLID accessible to a wider audience. If there are any PuLID based resources and applications that we have not mentioned here, please let us know, and we will include them in this list.

Online Demo

ComfyUI

WebUI

Other Applications

Disclaimer

This project strives to impact the domain of AI-driven image generation positively. Users are granted the freedom to create images using this tool, but they are expected to comply with local laws and utilize it responsibly. The developers do not assume any responsibility for potential misuse by users.

Citation

If PuLID is helpful, please help to ⭐ the repo.

If you find this project useful for your research, please consider citing our paper:

@InProceedings{guo2024pulid,
  title={PuLID: Pure and Lightning ID Customization via Contrastive Alignment},
  author={Guo, Zinan and Wu, Yanze and Chen, Zhuowei and Chen, Lang and Zhang, Peng and He, Qian},
  booktitle={Advances in Neural Information Processing Systems},
  year={2024}
}

:e-mail: Contact

If you have any comments or questions, please open a new issue or feel free to contact Yanze Wu and Zinan Guo.