zsxkib / pulid

📖 PuLID: Pure and Lightning ID Customization via Contrastive Alignment

  • Public
  • 782.8K runs
  • GitHub
  • Paper
  • License

PuLID: Pure and Lightning ID Customization (Classic Version)

Welcome to PuLID v1.0, a tuning-free ID customization solution for text-to-image models. This is the classic version of PuLID, designed to work with Stable Diffusion XL.

🆕 Looking for PuLID for FLUX? Check out our FLUX-PuLID demo!

About PuLID

PuLID (Pure and Lightning ID customization) is an AI model that customizes images, especially faces, while preserving important identity features. Here’s what PuLID does:

  • Adds a specific identity (like a person’s face) to a text-to-image model without altering the model’s core functionality.
  • Creates images with high identity similarity.
  • Allows modification of attributes, styles, and backgrounds using text prompts.
  • Maintains consistency in image elements like background, lighting, and style.
  • Provides extensive options for editing and refining generated images.

PuLID leverages advanced technologies: - Comprises two main components: a standard diffusion training part and an innovative Lightning T2I part. - Employs sophisticated methods for facial identity comprehension. - Utilizes a “contrastive alignment” technique to ensure image consistency. - Generates images rapidly while maintaining identity accuracy.

Applications of PuLID include: - Creating personalized avatars and characters - Facial editing and enhancement - Developing digital art - Producing prototypes and visualizations

How to Use This Replicate Demo

  1. Upload an image containing the identity you wish to customize.
  2. Enter a text prompt describing the image you want to generate.
  3. Adjust the settings as needed (refer to “Advanced Settings” below).
  4. Click to generate your customized image!

Advanced Settings

  1. Seed: Set a specific seed for reproducible results.
  2. Guidance Scale: Controls how closely the image adheres to your text prompt.
  3. Number of Inference Steps: More steps can lead to higher quality but increase generation time.
  4. Negative Prompt: Describe elements you want to avoid in the generated image.

Useful Tips

  • For best results, use clear, front-facing images of faces as your identity input.
  • Experiment with different prompts to explore various styles and scenarios.
  • If the generated image doesn’t capture the identity well, try adjusting the guidance scale or increasing the number of inference steps.
  • Use negative prompts to refine your results, especially for avoiding unwanted elements.

Limitations

  • While PuLID performs well on a wide range of identities, results may vary depending on the input image quality and facial characteristics.
  • Very complex or abstract prompts might lead to less accurate identity preservation.
  • The model works best with front-facing, clear images of faces.

Examples

Here are some examples of images generated with PuLID:

PuLID Examples

Learn More

For more technical details, latest updates, and additional examples, visit our GitHub repository.

If you find PuLID helpful, please star our repo or share it with others!

Questions or Suggestions?

If you have questions or ideas for improvement, please open an issue on our GitHub repository.

Citation

If you use PuLID in your work, please cite:

@article{guo2024pulid,
  title={PuLID: Pure and Lightning ID Customization via Contrastive Alignment},
  author={Guo, Zinan and Wu, Yanze and Chen, Zhuowei and Chen, Lang and He, Qian},
  journal={arXiv preprint arXiv:2404.16022},
  year={2024}
}

Support

For updates and more AI content, follow: - The lead developers: - Yanze Wu: GitHub - Zinan Guo: Email - If you like my work, please follow me! @zsakib