简介
插件分类
graph TD
A[插件资源] --> B[核心插件]
A --> C[功能插件]
A --> D[工具插件]
A --> E[扩展插件]
A --> F[社区插件]
B --> B1[ComfyUI-Manager]
B --> B2[ComfyUI-GGUF]
B --> B3[ComfyUI-VideoHelperSuite]
C --> C1[ComfyUI-AnimateDiff]
C --> C2[ComfyUI-ControlNet]
C --> C3[ComfyUI-IPAdapter]
D --> D1[ComfyUI-WD14-Tagger]
D --> D2[ComfyUI-Impact-Pack]
D --> D3[ComfyUI-Custom-Scripts]
E --> E1[ComfyUI-ExLlamaV2]
E --> E2[ComfyUI-LLM]
E --> E3[ComfyUI-AudioScheduler]
F --> F1[社区贡献插件]
F --> F2[第三方插件]
F --> F3[实验性插件]
style A fill:#e1f5ff
style B fill:#e1ffe1
style C fill:#e1ffe1
style D fill:#e1ffe1
style E fill:#e1ffe1
style F fill:#e1ffe1
核心插件
1. ComfyUI-Manager
{
"plugin": {
"name": "ComfyUI-Manager",
"author": "ltdrdata",
"version": "latest",
"repository": "https://github.com/ltdrdata/ComfyUI-Manager",
"description": "ComfyUI插件管理器,提供插件安装、更新、管理功能"
}
}
- 插件安装和更新
- 模型下载管理
- 工作流分享
- 节点搜索
- 一键安装
# 使用Git克隆
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
# 或使用ComfyUI-Manager安装
# 在ComfyUI界面中打开Manager,搜索并安装
# 通过API安装插件
import requests
def install_plugin(plugin_url):
"""安装插件"""
response = requests.post(
"http://127.0.0.1:8188/manager/install",
json={"url": plugin_url}
)
return response.json()
# 使用示例
# install_plugin("https://github.com/author/plugin-name")
2. ComfyUI-GGUF
{
"plugin": {
"name": "ComfyUI-GGUF",
"author": "city96",
"version": "latest",
"repository": "https://github.com/city96/ComfyUI-GGUF",
"description": "支持GGUF量化模型,降低显存占用"
}
}
- GGUF模型支持
- 量化模型加载
- 低显存优化
- 多精度支持
{
"gguf_config": {
"model": "model.gguf",
"quantization": "q4_k_m",
"benefits": "显存占用降低50-70%",
"trade_offs": "质量轻微下降"
}
}
3. ComfyUI-VideoHelperSuite
{
"plugin": {
"name": "ComfyUI-VideoHelperSuite",
"author": "Kosinkadink",
"version": "latest",
"repository": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite",
"description": "视频处理工具集,支持视频加载、保存、处理"
}
}
- 视频加载和保存
- 视频帧处理
- 视频格式转换
- 批量视频处理
# 加载视频
video_path = "input.mp4"
frames = load_video(video_path)
# 处理视频帧
processed_frames = []
for frame in frames:
processed = process_frame(frame)
processed_frames.append(processed)
# 保存视频
save_video(processed_frames, "output.mp4", fps=30)
功能插件
4. ComfyUI-AnimateDiff
{
"plugin": {
"name": "ComfyUI-AnimateDiff",
"author": "Kosinkadink",
"version": "latest",
"repository": "https://github.com/Kosinkadink/ComfyUI-AnimateDiff",
"description": "动画生成插件,支持视频和动画生成"
}
}
- 动画生成
- 视频风格化
- 动画插值
- 多帧处理
{
"animatediff_config": {
"model": "mm_sd_v15_v2.ckpt",
"motion_scale": 1.0,
"num_frames": 16,
"fps": 8
}
}
5. ComfyUI-ControlNet
{
"plugin": {
"name": "ComfyUI-ControlNet",
"author": "Fannovel16",
"version": "latest",
"repository": "https://github.com/Fannovel16/ComfyUI-ControlNet",
"description": "ControlNet支持插件,提供精确的图像控制"
}
}
- 多ControlNet支持
- 预处理器集成
- 控制强度调节
- 实时预览
{
"controlnet_config": {
"model": "control_v11p_sd15_canny.safetensors",
"strength": 0.8,
"preprocessor": "canny",
"threshold_low": 100,
"threshold_high": 200
}
}
6. ComfyUI-IPAdapter
{
"plugin": {
"name": "ComfyUI-IPAdapter",
"author": "cubiq",
"version": "latest",
"repository": "https://github.com/cubiq/ComfyUI-IPAdapter",
"description": "图像提示适配器,使用图像作为提示"
}
}
- 图像提示
- 风格迁移
- 多图像融合
- 权重控制
{
"ipadapter_config": {
"model": "ip-adapter_sd15.bin",
"weight": 0.6,
"start": 0.0,
"end": 1.0
}
}
工具插件
7. ComfyUI-WD14-Tagger
{
"plugin": {
"name": "ComfyUI-WD14-Tagger",
"author": "pythongosssss",
"version": "latest",
"repository": "https://github.com/pythongosssss/ComfyUI-WD14-Tagger",
"description": "图像标签生成器,自动生成图像描述标签"
}
}
- 自动标签生成
- 多语言支持
- 标签权重
- 批量处理
# 生成图像标签
image = load_image("input.jpg")
tags = generate_tags(image)
# 使用标签生成提示词
prompt = ", ".join(tags)
generated_image = generate_image(prompt)
8. ComfyUI-Impact-Pack
{
"plugin": {
"name": "ComfyUI-Impact-Pack",
"author": "Dr.Lt.Data",
"version": "latest",
"repository": "https://github.com/ltdrdata/ComfyUI-Impact-Pack",
"description": "高级功能包,提供多种实用工具节点"
}
}
- 高级采样器
- 批处理工具
- 图像处理工具
- 性能优化工具
{
"impact_pack_nodes": [
"ImpactMakeTileBatch",
"ImpactSEGSLabel",
"ImpactSimpleDetectorSEGS"
]
}
9. ComfyUI-Custom-Scripts
{
"plugin": {
"name": "ComfyUI-Custom-Scripts",
"author": "pythongosssss",
"version": "latest",
"repository": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts",
"description": "自定义脚本集合,提供多种自定义节点"
}
}
- 自定义节点
- 高级功能
- 实用工具
- 扩展接口
{
"custom_scripts_nodes": [
"ImageScaleToTotalPixels",
"ImageBatchSplit",
"TextConcatenate"
]
}
扩展插件
10. ComfyUI-ExLlamaV2
{
"plugin": {
"name": "ComfyUI-ExLlamaV2",
"author": "city96",
"version": "latest",
"repository": "https://github.com/city96/ComfyUI-ExLlamaV2",
"description": "ExLlamaV2集成,支持大语言模型"
}
}
- LLM支持
- 文本生成
- 对话系统
- 文本编码
# 使用LLM生成提示词
llm = load_llm("llama-2-7b.gguf")
prompt = "生成一个美丽的风景描述"
enhanced_prompt = llm.generate(prompt)
11. ComfyUI-LLM
{
"plugin": {
"name": "ComfyUI-LLM",
"author": "Nuked88",
"version": "latest",
"repository": "https://github.com/Nuked88/ComfyUI-LLM",
"description": "大语言模型集成,提供文本生成和理解能力"
}
}
- 多LLM支持
- 文本生成
- 提示词优化
- 对话系统
{
"llm_config": {
"model": "llama-2-7b",
"temperature": 0.7,
"max_tokens": 512
}
}
12. ComfyUI-AudioScheduler
{
"plugin": {
"name": "ComfyUI-AudioScheduler",
"author": "BlenderNeko",
"version": "latest",
"repository": "https://github.com/BlenderNeko/ComfyUI-AudioScheduler",
"description": "音频调度器,支持音频驱动的生成"
}
}
- 音频分析
- 节奏同步
- 音频可视化
- 音乐视频生成
# 音频驱动生成
audio = load_audio("music.mp3")
rhythm = analyze_rhythm(audio)
images = generate_rhythm_images(rhythm)
video = create_music_video(images, audio)
社区插件
13. 社区贡献插件
{
"popular_plugins": [
{
"name": "ComfyUI-InstantID",
"repository": "https://github.com/InstantID/InstantID",
"description": "身份保持生成"
},
{
"name": "ComfyUI-IC-Light",
"repository": "https://github.com/lllyasviel/IC-Light",
"description": "光照控制"
},
{
"name": "ComfyUI-LayerStyle",
"repository": "https://github.com/LayerStyle/LayerStyle",
"description": "图层风格化"
}
]
}
14. 第三方插件
{
"third_party_plugins": [
{
"name": "ComfyUI-Segment-Anything",
"repository": "https://github.com/storyicon/comfyui_segment_anything",
"description": "图像分割"
},
{
"name": "ComfyUI-3D-Pack",
"repository": "https://github.com/MrForExample/ComfyUI-3D-Pack",
"description": "3D生成工具"
},
{
"name": "ComfyUI-Gaussian-Blur",
"repository": "https://github.com/BlenderNeko/ComfyUI-Gaussian-Blur",
"description": "高斯模糊"
}
]
}
插件安装
安装方法
graph TD
A[打开ComfyUI] --> B[点击Manager]
B --> C[搜索插件]
C --> D[点击安装]
D --> E[重启ComfyUI]
E --> F[使用插件]
style A fill:#e1f5ff
style B fill:#e1ffe1
style C fill:#e1ffe1
style D fill:#e1ffe1
style E fill:#e1ffe1
style F fill:#e1ffe1
# 进入custom_nodes目录
cd ComfyUI/custom_nodes
# 克隆插件
git clone https://github.com/author/plugin-name.git
# 重启ComfyUI
# 下载插件ZIP文件
wget https://github.com/author/plugin-name/archive/main.zip
# 解压到custom_nodes目录
unzip main.zip -d ComfyUI/custom_nodes/
# 重启ComfyUI
插件管理
class PluginManager:
def __init__(self, comfyui_path):
self.comfyui_path = comfyui_path
self.custom_nodes_path = os.path.join(comfyui_path, "custom_nodes")
def list_plugins(self):
"""列出所有插件"""
plugins = []
for item in os.listdir(self.custom_nodes_path):
plugin_path = os.path.join(self.custom_nodes_path, item)
if os.path.isdir(plugin_path):
plugins.append(item)
return plugins
def update_plugin(self, plugin_name):
"""更新插件"""
plugin_path = os.path.join(self.custom_nodes_path, plugin_name)
if os.path.exists(os.path.join(plugin_path, ".git")):
os.chdir(plugin_path)
subprocess.run(["git", "pull"])
def remove_plugin(self, plugin_name):
"""移除插件"""
plugin_path = os.path.join(self.custom_nodes_path, plugin_name)
shutil.rmtree(plugin_path)
插件开发
开发指南
custom_nodes/
└── my_plugin/
├── __init__.py
├── nodes.py
├── requirements.txt
└── README.md
import nodes
class MyCustomNode:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"input_data": ("DATA",),
"parameter": ("FLOAT", {"default": 1.0})
}
}
RETURN_TYPES = ("DATA",)
FUNCTION = "process"
def process(self, input_data, parameter):
# 处理逻辑
result = input_data * parameter
return (result,)
NODE_CLASS_MAPPINGS = {
"MyCustomNode": MyCustomNode
}
最佳实践
插件使用建议
- 按需安装: 只安装需要的插件
- 定期更新: 定期更新插件
- 测试兼容性: 测试插件兼容性
- 备份数据: 安装前备份数据
- 查看文档: 查看插件文档
插件选择指南
graph TD
A[选择插件] --> B{需求类型?}
B -->|插件管理| C[ComfyUI-Manager]
B -->|视频处理| D[VideoHelperSuite]
B -->|动画生成| E[AnimateDiff]
B -->|图像控制| F[ControlNet]
B -->|标签生成| G[WD14-Tagger]
B -->|LLM集成| H[ExLlamaV2]
style A fill:#e1f5ff
style C fill:#e1ffe1
style D fill:#e1ffe1
style E fill:#e1ffe1
style F fill:#e1ffe1
style G fill:#e1ffe1
style H fill:#e1ffe1
总结
插件资源大大扩展了ComfyUI的功能。关键要点:
- 核心插件: 安装核心插件提供基础功能
- 功能插件: 根据需求选择功能插件
- 工具插件: 使用工具插件提高效率
- 扩展插件: 尝试扩展插件探索新功能
- 社区插件: 关注社区插件获取最新功能
通过合理使用插件,可以大大扩展ComfyUI的功能和效率。