ComfyUI InstantID (Native Support) Introduction
ComfyUI_InstantID is an extension designed to integrate the InstantID model natively into ComfyUI. This extension allows AI artists to generate identity-preserving images quickly and efficiently without the need for complex configurations or external dependencies like diffusers. By using ComfyUI_InstantID, you can achieve high-quality, consistent results in your AI-generated artwork, making it easier to maintain the identity of subjects across different images.
How ComfyUI InstantID (Native Support) Works
ComfyUI_InstantID leverages the InstantID model to generate images that preserve the identity of the subject from a reference image. The model uses keypoints from the reference image to guide the generation process, ensuring that the resulting images maintain the unique features and characteristics of the subject. This is particularly useful for creating consistent character designs, portraits, and other identity-sensitive artworks.
Basic Principles
- Keypoint Extraction: The model extracts keypoints from the reference image, which represent crucial facial features and landmarks.
- Image Generation: Using these keypoints, the model generates new images that maintain the identity of the subject.
- Noise Injection: To enhance the likeness and reduce artifacts, noise can be injected into the negative embeddings during the generation process.
ComfyUI InstantID (Native Support) Features
Native Integration
- Seamless Integration: ComfyUI_InstantID integrates directly with ComfyUI, providing a smooth and user-friendly experience without the need for additional plugins or tools.
Noise Injection
- Enhanced Likeness: By injecting noise into the negative embeddings, the model can produce images that are more faithful to the reference image. This feature is customizable, allowing you to fine-tune the amount of noise for optimal results.
Multi-ID Support
- Multiple Identities: The extension supports generating images with multiple identities, although this process can be more complex and slower. Example workflows are provided to help you get started.
Advanced Node
- Customization: The advanced node allows you to set weights for the InstantID models and controlnets separately, providing greater control over the final output. This node also includes options for noise injection.
Additional Controlnets
- Enhanced Control: You can add more controlnets to the generation process, such as depth controlnets, to achieve more detailed and controlled results.
Styling with IPAdapter
- Styling Options: The extension supports styling the composition using IPAdapter, allowing you to apply different artistic styles to your generated images.
ComfyUI InstantID (Native Support) Models
ComfyUI_InstantID uses the antelopev2 model from InsightFace for keypoint extraction and the IPAdapter model for image generation. These models are specifically chosen for their accuracy and efficiency in preserving identity.
Available Models
- Antelopev2: Used for extracting keypoints from the reference image.
- IPAdapter: Used for generating the final image based on the extracted keypoints.
What's New with ComfyUI InstantID (Native Support)
Recent Updates
- 2024/02/27: Added noise injection in the negative embeddings to improve likeness and reduce artifacts.
- 2024/02/26: Fixed a bug that affected the results, requiring a lower CFG (Classifier-Free Guidance) setting.
- 2024/02/20: Refactored nodes for easier use. Note that this is a breaking update, and previous workflows will no longer work.
Troubleshooting ComfyUI InstantID (Native Support)
Common Issues and Solutions
- Images Not Preserving Identity:
- Solution: Ensure that the reference image is clear and well-lit. Adjust the noise injection settings to find the optimal balance.
- Slow Generation with Multi-ID:
- Solution: Follow the provided example workflows and consider simplifying the scene or reducing the number of identities.
- CFG Settings:
- Solution: Lower the CFG to at least 4/5 or use the RescaleCFG node to achieve better results.
Frequently Asked Questions
- Q: Why are there watermarks in my generated images?
- A: The training data may contain watermarks. Use a resolution slightly different from 1024×1024, such as 1016×1016, to avoid this issue.
- Q: How do I change the pose of the subject?
- A: You can use a different image for the
image_kps
input to change the pose of the subject.
Learn More about ComfyUI InstantID (Native Support)
Additional Resources
- Video Tutorial:
- Example Workflows: Available in the
examples
directory of the repository.
- Community Support: Join the discussion and get support on the ComfyUI Discord (https://latent.vision/discord).
By using ComfyUI_InstantID, you can enhance your AI-generated artwork with consistent and identity-preserving images, making it an invaluable tool for AI artists.