ComfyUI implementation of FlashFace: Human Image Personalization with High-fidelity Identity Preservation
Officially implemented here: https://github.com/ali-vilab/FlashFace
- Navigate to the
custom_nodesdirectory in your ComfyUI installation. - Install the custom node by running
git clone https://github.com/cold-hand/ComfyUI-FlashFace.gitin thecustom_nodesdirectory. - If you are using a virtual environment, activate it.
- cd into the
ComfyUI-FlashFacedirectory and run setup.sh or setup.bat depending on your OS.- This will install all required dependencies including
pydash - Alternatively, you can run
pip install pydash==7.0.7manually
- This will install all required dependencies including
- Restart ComfyUI and refresh your browser and you should see the FlashFace node in the node list.
- Load the provided example-workflow.json in file in the examples/comfyui folder of this repo to see how the nodes are used.
This extension requires the following key dependencies:
- Python 3.8+
- PyTorch (included in ComfyUI)
- pydash 7.0.7 or newer
- See
requirements.txtfor the full list
If you encounter any import errors, run python install_dependencies.py from the extension directory.
- Installation Guide - Detailed installation instructions
- Technical Documentation - Architecture and developer information
- Improvements - Summary of recent refactoring and improvements
The FlashFace node takes in an image and outputs a personalized image with the desired attributes. In comparison with InstantId I feel that it yields more realistic results. The original repo had a limit of 4 reference images, that limitation has been removed in this implementation. I've found that generally the more reference images you provide the better the results. as seen below:
Example Reference Image:
Nicki Minaj
| Output with 1 Reference Image | Output with 4 Reference Images | Output with 8 Reference Images | Output with 16 Reference Images |
![]() |
![]() |
![]() |
![]() |
- [5/22/2024]: Initial release
- [Current Date]: Major refactoring and improvements:
- Added robust model loading with SafeTensors support
- Implemented automatic model downloading from HuggingFace
- Improved model path resolution for different ComfyUI installation configurations
- Enhanced error handling and reporting
- Added pydash dependency to requirements
- Added model registry system for easy management of model files



