0
查看仓库https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
Diffusion-Pipe In ComfyUI 自定义节点是一个强大的扩展插件,为 ComfyUI 提供了完整的 Diffusion 模型训练和微调功能。这个项目允许用户在 ComfyUI 的图形界面中配置和启动各种先进 AI 模型的训练,支持 LoRA 和全量微调,涵盖了当前最热门的图像生成和视频生成模型。
20251026:评估支持
20251030:支持aura模型训练
20251103:支持多图像编辑(qwen2509)
20251105:支持遮罩训练,修复了使用示例作为x轴时绘图中的一个错误,允许在没有tar文件的情况下使用captions.json,添加reset_optimizer标志,--reset_optimiser_params标志(重置优化器参数,可以在继续训练时重置优化器),修复数据集问题,在数据集缓存中将Cast转换为float16以将磁盘大小减半
确保你在Linux或者WSL2系统上拥有ComfyUI,参考https://docs.comfy.org/installation/manual_install
ps:WSL2上的comfyui十分好用,我甚至想删除我在win上的comfyui
conda create -n comfyui_DP python=3.12
conda activate comfyui_DP
cd ~/comfy/ComfyUI/custom_nodes/
git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
如果你没有安装子模块,进行以下步骤
如果你不进行此步骤,训练将无法进行
git submodule init
git submodule update
conda activate comfyui_DP
这里是deepspeed的必要依赖,首先安装 PyTorch。它未在需求文件中列出,因为某些 GPU 有时需要不同版本的 PyTorch 或 CUDA,您可能必须找到适合您的硬件的组合。
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128
cd ~/comfy/ComfyUI/custom_nodes/Diffusion_pipe_in_ComfyUI
pip install -r requirements.txt
为了让你快速开始,我提供了预配置的 ComfyUI 工作流文件:
将此文件拖拽到 ComfyUI 界面中即可导入完整的训练工作流,包含所有必要的节点配置。
本插件支持超过 20 种最新的 Diffusion 模型,包括:
| Model | LoRA | Full Fine Tune | fp8/quantization |
|---|---|---|---|
| SDXL | ✅ | ✅ | ❌ |
| Flux | ✅ | ✅ | ✅ |
| LTX-Video | ✅ | ❌ | ❌ |
| HunyuanVideo | ✅ | ❌ | ✅ |
| Cosmos | ✅ | ❌ | ❌ |
| Lumina Image 2.0 | ✅ | ✅ | ❌ |
| Wan2.1 | ✅ | ✅ | ✅ |
| Chroma | ✅ | ✅ | ✅ |
| HiDream | ✅ | ❌ | ✅ |
| SD3 | ✅ | ❌ | ✅ |
| Cosmos-Predict2 | ✅ | ✅ | ✅ |
| OmniGen2 | ✅ | ❌ | ❌ |
| Flux Kontext | ✅ | ✅ | ✅ |
| Wan2.2 | ✅ | ✅ | ✅ |
| Qwen-Image | ✅ | ✅ | ✅ |
| Qwen-Image-Edit | ✅ | ✅ | ✅ |
| Qwen-Image-Edit-2509 | ✅ | ✅ | ✅ |
| HunyuanImage-2.1 | ✅ | ✅ | ✅ |
| AuraFlow | ✅ | ❌ | ✅ |
本项目基于 Apache License 2.0 许可证开源。
欢迎提交 Issue 和 Pull Request!
感谢以下项目和团队:

支持自启动