zsxkib / instant-id-ipadapter-plus-face

Make realistic images of real people instantly (w/ ip-adapter-plus-face_sdxl_vit-h)

  • Public
  • 2.8K runs
  • GitHub
  • Paper
  • License

Instant ID with ip-adapter-plus-face_sdxl_vit-h

cubiq’s InstantID_IPAdapter example workflow

This tool uses AI to change face photos based on text descriptions.

What it does

  • Changes faces in photos based on text prompts
  • Lets you fine-tune the results with adjustable settings
  • Creates high-quality, large-scale images

How to use it

  1. Upload a face photo
  2. Write a description for the new image
  3. Adjust settings if desired
  4. Generate your new image

Settings

Main settings

Setting Description
Image Your starting face photo
Prompt Description of the desired output image
Negative prompt What to avoid in the image
Seed Number for reproducible results
Steps Controls quality vs. speed (more steps = higher quality)
Width & Height Output image dimensions

Advanced settings

Setting Description
instantid_weight Strength of face structure changes
ipadapter_weight Influence of the text prompt
instantid_start/end When InstantID effect begins/ends
ipadapter_start/end When IPAdapter effect begins/ends
ipadapter_weight_type How the IPAdapter effect is applied
ipadapter_combine_embeds Embedding combination method
ipadapter_embeds_scaling Scaling of the effect

These settings balance preserving the original face with applying new features.

Tips for great results

  • Experiment with different prompts
  • Adjust instantid_weight and ipadapter_weight to find the right balance
  • Increase steps for higher quality (but slower) results
  • Try various image sizes
  • Test different ipadapter_weight_type options

Fine-tuning Your Results

These settings can dramatically change your results:

  • instantid_weight (0.01 to 2.0, default 0.6): Controls how much the AI changes the face structure. Higher values create more drastic changes.

  • ipadapter_weight (0.01 to 2.0, default 0.7): Determines how strongly the AI applies the text description. Higher values make the final image match the prompt more closely.

  • ipadapter_weight_type: Chooses how the IPAdapter effect is applied over time. Options range from “linear” to complex patterns like “style transfer precise”, each giving unique results.

  • ipadapter_combine_embeds: Decides how different parts of the effect are combined. Options include “concat”, “add”, “subtract”, “average”, and “norm average”, each affecting the final look differently.

  • ipadapter_embeds_scaling: Controls how the effect is scaled. Options like “V only” or “K+V w/ C penalty” can significantly impact the final image.

For best results, keep the width and height at large values like 1600. This produces very high-quality images, though it may increase processing time.

Experiment with these settings to find the perfect balance between preserving the original face and achieving your desired transformation!

Have fun transforming faces with AI!

Safety and ethics

Please use this tool responsibly:

  • Only use images you have the right to modify
  • Be transparent about AI-generated content
  • Avoid using copyrighted material without permission
  • Respect privacy and get consent when applicable
  • Consider the broader impact of face-changing technology

Learn more about ethical AI use at Tencent’s AI Ethics Principles.

Credits and Acknowledgements

This model is powered by InstantID, created by the Tencent AI Lab team.

If you find this tool useful, follow the developer on Twitter: @zsakib_

ComfyUI implementations

Acknowledgements

Inspired by IP-Adapter and ControlNet

Thanks to: - ZHO-ZHO-ZHO, huxiuhan, sdbds, and zsxkib for their contributions - HuggingFace and ModelScope for GPU support

License

InstantID code is under the Apache License. Face models from insightface are for non-commercial research only. Users must comply with all applicable laws and licenses. The developers are not responsible for misuse.

Cite

If you find InstantID useful for your research and applications, please cite us using this BibTeX:

@article{wang2024instantid,
  title={InstantID: Zero-shot Identity-Preserving Generation in Seconds},
  author={Wang, Qixun and Bai, Xu and Wang, Haofan and Qin, Zekui and Chen, Anthony},
  journal={arXiv preprint arXiv:2401.07519},
  year={2024}
}