ComfyUI/custom_nodes/comfyui-hydit_min
2024-07-08 10:07:36 +08:00
..
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00
2024-07-08 10:07:36 +08:00

comfyui-hydit

This repository houses a tailored node and workflow designed specifically for HunYuan DIT. The official tests conducted on DDPM, DDIM, and DPMMS have consistently yielded results that align with those obtained through the Diffusers library. However, it's important to note that we cannot assure the consistency of results from other ComfyUI native samplers with the Diffusers inference. We cordially invite users to explore our workflow and are open to receiving any inquiries or suggestions you may have.

Overview

Workflow text2image

Workflow workflow_ksampler file for HunyuanDiT txt2image with ksampler backend.

Usage

Make sure you run the following command inside ComfyUI project with our comfyui-hydit and have correct conda environment.

# Download comfyui code
git clone https://github.com/comfyanonymous/ComfyUI.git

# Install torch, torchvision, torchaudio
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu117 --default-timeout=100 future

# Install Comfyui essential python package
cd ComfyUI
pip install -r requirements.txt

# ComfyUI has been successfully installed!


# Move to the ComfyUI custom_nodes folder and copy comfyui-hydit folder from HunyuanDiT Repo.
cd custom_nodes
git clone https://github.com/Tencent/HunyuanDiT.git
cp -r HunyuanDiT/comfyui-hydit ./
rm -rf HunyuanDiT
cd comfyui-hydit

# If using windows system !!
cd custom_nodes
git clone https://github.com/Tencent/HunyuanDiT.git
xcopy /E /I HunyuanDiT\comfyui-hydit comfyui-hydit
rmdir /S /Q HunyuanDiT
cd comfyui-hydit

# Install some essential python Package.
pip install -r requirements.txt

# Our tool has been successfully installed!

# Go to ComfyUI main folder
cd ../..
# Run the ComfyUI Lauch command
python main.py --listen --port 80

# Running ComfyUI successfully!

Download weights for ksampler mode

Download the clip encoder and place it in ComfyUI/models/clip
Download the mt5 and place it in ComfyUI/models/t5
Download the base model and place it in ComfyUI/models/checkpoints
Download the sdxl vae and place it in ComfyUI/models/vae

Custom Node

Below I'm trying to document all the nodes, thanks for some good work[1][2].

HunYuan Checkpoint Loader

  • Loads the base model for HunYuanDiT in ksampler backend.
  • model_name is the weight list of comfyui checkpoint folder.

HunYuan CLIP Loader

  • Loads the clip and mt5 model for HunYuanDiT in ksampler backend.
  • text_encoder_path is the weight list of comfyui clip model folder.
  • t5_text_encoder_path is the weight list of comfyui t5 model folder.

HunYuan VAE Loader

  • Loads the vae model for HunYuanDiT in ksampler backend.
  • model_name is the weight list of comfyui vae model folder.

Reference

[1] https://github.com/Limitex/ComfyUI-Diffusers
[2] https://github.com/Tencent/HunyuanDiT/pull/59