ComfyUI-NuA-FlashFace

ComfyUI-NuA-FlashFace
★ 26

人脸个性化身份保真零样本语言控制
ComfyUI节点,基于FlashFace,用一张或多张参考人脸实现秒级零样本个性化并高保真保留身份,支持文本控制;需手动下载模型权重。
💡 用一张或多张参考脸和文本提示快速生成保真人像。
🍴 3 Forks💻 Python🔄 2024-07-31
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/79aaff81621b
📦 requirements.txt
numpy
safetensors
torch
torchvision
transformers
easydict
ftfy
📄 README

ComfyUI-NuA-FlashFace

ComfyUI implementation of FlashFace: Human Image Personalization with High-fidelity Identity Preservation

Features

  • Zero-shot human image customization within seconds with one or several reference faces.
  • Strong identity preservation ability, even for non-celebrities
  • Strong language prompts following ability, even changing the age or gender of the person.
  • Flexible strength adjustment for identity image control and language prompt control.
  • Installation

  • Clone the repository into the ComfyUI/custom_nodes directory
  • “`sh

    cd ComfyUI/custom_nodes

    git clone https://github.com/nuanarchy/ComfyUI-NuA-FlashFace.git

    “`

  • Install the required modules
  • “`sh

    pip install -r ComfyUI-NuA-FlashFace/requirements.txt

    “`

  • Copy the model weights into the appropriate folders
  • “`sh

    mkdir ComfyUI/models/flashface

    mkdir ComfyUI/models/face_detection

    wget -O ComfyUI/models/flashface/flashface.ckpt https://huggingface.co/shilongz/FlashFace-SD1.5/resolve/main/flashface.ckpt?download=true

    wget -O ComfyUI/models/vae/sd-v1-vae.pth https://huggingface.co/shilongz/FlashFace-SD1.5/resolve/main/sd-v1-vae.pth?download=true

    wget -O ComfyUI/models/clip/openai-clip-vit-large-14.pth https://huggingface.co/shilongz/FlashFace-SD1.5/resolve/main/openai-clip-vit-large-14.pth?download=true

    wget -O ComfyUI/models/clip/bpe_simple_vocab_16e6.txt.gz https://huggingface.co/shilongz/FlashFace-SD1.5/resolve/main/bpe_simple_vocab_16e6.txt.gz?download=true

    wget -O ComfyUI/models/face_detection/retinaface_resnet50.pth https://huggingface.co/shilongz/FlashFace-SD1.5/resolve/main/retinaface_resnet50.pth?download=true

    “`

  • Alternatively, you can use the install.py script to automate the setup process:
  • “`sh

    cd ComfyUI/custom_nodes/ComfyUI-NuA-FlashFace

    python install.py

    “`

    Examples

    In the examples folder, you will find the workflow diagram, the JSON file with the configuration, and four resulting images.

    Workflow Diagram

    Resulting Images

    Result Image 1 Result Image 2
    Result Image 3 Result Image 4