Install this extension via the ComfyUI Manager by searching
for ComfyUI PhotoMaker (ZHO)
1. Click the Manager button in the main menu
2. Select Custom Nodes Manager button
3. Enter ComfyUI PhotoMaker (ZHO) in the search bar
After installation, click the Restart button to
restart ComfyUI. Then, manually
refresh your browser to clear the cache and access
the updated list of nodes.
Visit
ComfyUI Online
for ready-to-use ComfyUI environment
ComfyUI PhotoMaker (ZHO) is an unofficial implementation of TencentARC's PhotoMaker for ComfyUI, designed to enhance photo editing capabilities within the ComfyUI framework.
ComfyUI PhotoMaker (ZHO) Introduction
ComfyUI-PhotoMaker-ZHO is an unofficial implementation of the PhotoMaker project, designed to work seamlessly with ComfyUI. This extension allows AI artists to create highly realistic and stylized human photos by leveraging advanced machine learning models. Whether you are looking to generate portraits, apply artistic styles, or experiment with different visual effects, ComfyUI-PhotoMaker-ZHO provides a versatile and powerful toolset to enhance your creative workflow.
How ComfyUI PhotoMaker (ZHO) Works
ComfyUI-PhotoMaker-ZHO operates by integrating with the ComfyUI framework and utilizing pre-trained models to generate images based on user inputs. The extension works by loading a base model and an adapter model, which are then used to process reference images and apply various styles and effects. The process can be broken down into the following steps:
Model Loading: The extension loads a base model from either a local source or the Hugging Face hub. This model serves as the foundation for image generation.
Adapter Loading: An adapter model is loaded to customize the base model's behavior, allowing for specific styles and effects.
Image Preprocessing: Reference images are preprocessed to ensure they are compatible with the models.
Image Generation: The processed images are fed into the models, along with user-defined prompts and settings, to generate the final output.
ComfyUI PhotoMaker (ZHO) Features
Base Model Loader
From Hugging Face Hub: Automatically download models by specifying the model name (e.g., SG161222/RealVisXL_V3.0).
Locally: Load models from your local storage, specifically SDXL series models.
PhotoMaker Adapter Loader
From Hugging Face Hub: Automatically download adapter models.
Locally: Load adapter models from your local storage by specifying the path to the photomaker-v1.bin file.
Ref Image Preprocessing
Direct Input: Directly input one or multiple images.
Path Input: Automatically read all images from a specified directory.
LoRALoader
Local LoRA Models: Load local LoRA models.
Weight Adjustment: Adjust the weights of the LoRA models to fine-tune the output.
Prompt_Styler
Prompt and Negative Prompt: Input positive and negative prompts to guide the image generation.
Weight Adjustment: Adjust the weights of the prompts.
Style Selection: Choose from 10 predefined styles, including Cinematic, Disney Character, Digital Art, and more.
PhotoMaker Generation
Model Integration: Integrate the base and adapter models.
Image Input: Input preprocessed images.
Batch Size: Specify the number of images to generate.
Style Strength Ratio: Adjust the strength of the applied style.
Steps: Set the number of steps for the generation process.
Guidance Scale: Adjust the relevance of the prompts.
Dimensions: Set the width and height of the output images.
Seed: Specify a seed for reproducibility.
ComfyUI PhotoMaker (ZHO) Models
ComfyUI-PhotoMaker-ZHO supports various models that can be loaded from the Hugging Face hub or locally. These models include:
Base Models: Used as the foundation for image generation.
Adapter Models: Customize the behavior of the base models to apply specific styles and effects.
LoRA Models: Enhance the base models with additional layers for more detailed and stylized outputs.
Troubleshooting ComfyUI PhotoMaker (ZHO)
Common Issues and Solutions
Model Loading Errors:
Ensure the model names and paths are correct.
Verify your internet connection if downloading from the Hugging Face hub.
Image Preprocessing Failures:
Check the format and resolution of the input images.
Ensure the images are accessible and not corrupted.
Unexpected Output:
Adjust the prompts and weights.
Experiment with different styles and settings.
Frequently Asked Questions
Q: Can I use multiple reference images?
A: Yes, you can input multiple images either directly or by specifying a directory.
Q: How do I adjust the style strength?
A: Use the style_strength_ratio parameter to control the intensity of the applied style.
Q: What is the recommended number of steps for generation?
A: While the default is 50 steps, 30 steps are often sufficient for high-quality results.
Learn More about ComfyUI PhotoMaker (ZHO)
For additional resources, tutorials, and community support, consider exploring the following:
Community Forums
These resources provide valuable insights, examples, and support to help you make the most of ComfyUI-PhotoMaker-ZHO in your creative projects.