Skip to content

hhhwmws0117/Comfy_Preprocess_Haruhi

Repository files navigation

Comfy_Preprocess_Haruhi

Native Comfy_Preprocess_Haruhi support for ComfyUI.

For InstantID

This extension differs from the many already available as it doesn't use diffusers but instead implements InstantID natively and it fully integrates with ComfyUI.

Important updates

  • 2024/03/25 完成了第二版的controlnet预处理节点,可以直接在ComfyUI中使用

  • 2024/03/16: 上传了第一版controlnet预处理节点

GIF Tutorial

GIF_Tutorial

安装

Upgrade ComfyUI to the latest version!

Remember at the moment this is only for SDXL.

  1. 下载 或者 使用git clone 本文件夹或者 Comfy_Preprocess_HaruhiComfyUI/custom_nodes/ 目录下 或者 使用ComfyUI Manager.

  2. 请将silk-road/Haruhi-expression-controlnet-v3-xl下的controlnet模型下载到ComfyUI/models/controlnet目录下。

  3. 本项目代码部分参考Fannovel16/comfyui_controlnet_aux,并使用新版的controlnet加载方法,请一并安装。

  4. 工作流中名字中带有InstantID前缀的将依赖InstantID节点,所以请确保已经安装InstantID节点。参考教程:

    InstantID requires insightface, you need to add it to your libraries together with onnxruntime and onnxruntime-gpu.

    The InsightFace model is antelopev2 (not the classic buffalo_l). Download the models (for example from here or here), unzip and place them in the ComfyUI/models/insightface/models/antelopev2 directory.

    The main model can be downloaded from HuggingFace and should be placed into the ComfyUI/models/instantid directory. (Note that the model is called ip_adapter as it is based on the IPAdapter).

    You also needs a controlnet, place it in the ComfyUI controlnet directory.

基础使用

如果你想使用Haruhi preprocesser节点搭建自己的工作流,节点在node的ControlPreprocessHaruhi目录下,共有四种preprocesser节点:

  • 📷Ref Image Preprocessing_mix_v1
    • 第一版搭建的controlnet预处理模块,基于基本的openpose和未经mask的lineart进行叠加
    • 对应的controlnet模型为controlnet_face-v2-XL
  • 📷Ref Image Preprocessing_facepose_v2
    • 第二版搭建的controlnet预处理模块,基于自定义的openpose关键点进行连线并上色——facepose
    • 对应的controlnet模型为 controlnet_colored_v3
  • 📷Ref Image Preprocessing_maskedlineart_v2
    • 第二版搭建的controlnet预处理模块,基于对内脸切分进行mask的lineart
    • 对应的controlnet模型为controlnet_meshBlended_v3
  • 📷Ref Image Preprocessing_mix_v2
    • 第二版搭建的controlnet预处理模块,基于自定义的facepose和masked lineart进行叠加
    • 对应的controlnet模型为controlnet_meshedLSD_v3

请使用Load Advanced ControlNet Model(diff)进行加载,选择对应的controlnet模型即可,基模型为sd_xl_base_1.0.safetensors,可参考示例工作流。

Basic Workflow

WORKFLOWS 目录下有测试通过的一些基本工作流

workflow

ControlNet Model

本项目共训练了三个批次的controlnet模型,均基于Celeb数据集以及一些公开可爬取的网络数据进行训练:

已知问题

水印

训练数据中充满了水印,为避免水印出现在生成的数据中,请使用与 1024×1024 稍微不同的分辨率(或标准分辨率),例如1016×1016,效果相当不错,或者尝试在negative prompt中加入一些提示词,可能的水印来源getty images。

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published