使用 ComfyUI 生成 AI 媒体:图像、视频、3D 和音频桥接
这是一个Design、AI领域的自动化工作流,包含 51 个节点。主要使用 If、Set、Code、Wait、Merge 等节点,结合人工智能技术实现智能自动化。 使用 ComfyUI 生成 AI 媒体:图像、视频、3D 和音频桥接
- •Discord Bot Token 或 Webhook
- •可能需要目标 API 的认证凭证
使用的节点 (51 个)
{
"meta": {
"instanceId": "ac38155473bd7a3f3a3af4af90e7d7ca28f5fe10e31f842eaa893df9f5f2f49f",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "4b4836b3-0a00-4ab1-ae02-d047e0ce9915",
"name": "当被其他工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-200,
220
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "dc9db75c-99a9-4e21-8521-64277a8919ee",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
1160,
700
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "854d1b0d-282b-4e9d-9f16-b344b3578dfb",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
860,
160
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "ca324db3-78a6-420c-91a7-58aac957483c",
"name": "条件判断",
"type": "n8n-nodes-base.if",
"position": [
1080,
140
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "ed82fb41-97f3-4c55-a564-0b3606d7d573",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
1300,
220
],
"webhookId": "74b4a6b9-fe89-4023-b09f-ba5488cb515f",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "3c40f341-466c-4202-8943-9654dba64f23",
"name": "获取生成的图像",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1720,
140
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "036d5e1a-f6aa-41bb-aaae-cf623ff679a0",
"name": "获取历史记录失败",
"type": "n8n-nodes-base.code",
"position": [
740,
560
],
"parameters": {},
"typeVersion": 2
},
{
"id": "29ae5520-1a70-4bf3-b91d-5516b52528ab",
"name": "连接配置",
"type": "n8n-nodes-base.set",
"position": [
20,
220
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "8b0633e2-0399-464a-8da2-7fefd199ae1d",
"name": "触发本地工作流",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
340,
200
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "b22b686a-3f82-454f-b416-e21f7daab06c",
"name": "触发失败",
"type": "n8n-nodes-base.code",
"position": [
320,
720
],
"parameters": {},
"typeVersion": 2
},
{
"id": "47b4c26a-fd30-444e-b068-bbd4d46b4606",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-300,
-60
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "6bb5fc8e-a31e-4bbc-a562-f5cc88449228",
"name": "写入错误日志",
"type": "n8n-nodes-base.readWriteFile",
"position": [
1620,
700
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6687c5ba-e28f-4eaa-9720-d5c5f237d1aa",
"name": "转换为文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
1400,
700
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "a65816db-72dd-4eaa-b540-5dc56fec03c9",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
940,
700
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "a440f7b1-eb70-499c-9989-9b4f2c99d38e",
"name": "聚合",
"type": "n8n-nodes-base.aggregate",
"disabled": true,
"position": [
1880,
680
],
"parameters": {},
"typeVersion": 1
},
{
"id": "37778379-98da-4e67-8656-2376cbd4d543",
"name": "Discord 警报",
"type": "n8n-nodes-base.discord",
"disabled": true,
"position": [
2040,
680
],
"webhookId": "4280db72-cccc-4b63-816d-bdc1b8d54ebe",
"parameters": {},
"typeVersion": 2
},
{
"id": "cc34d68c-8e38-4ac4-a63b-90b19142d863",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
440
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b76b7268-7e4c-449e-9e8e-06c5f5317106",
"name": "当点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-140,
-740
],
"parameters": {},
"typeVersion": 1
},
{
"id": "dedc67f5-7416-41f1-96bd-c349f285e5fc",
"name": "🎨🏠 运行本地 ComfyUI 工作流",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
2420,
-620
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "2cf57e77-af83-45aa-a883-e3895251265d",
"name": "上传附件本地",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1320,
-960
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "14dc4c91-ae32-4d6d-a8e0-6db04aec8859",
"name": "上传失败",
"type": "n8n-nodes-base.code",
"position": [
1680,
-860
],
"parameters": {},
"typeVersion": 2
},
{
"id": "a426d1a2-7ca0-47d5-84b7-7688dc04ca2c",
"name": "客户端 ID",
"type": "n8n-nodes-base.crypto",
"position": [
80,
-740
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d7d9a07a-fcc1-44e8-a001-e941ecd5dc47",
"name": "等待选择测试类型",
"type": "n8n-nodes-base.wait",
"position": [
520,
-740
],
"webhookId": "88daece1-93cb-402a-814c-3bad0720fcd1",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "caf1fc4e-8e58-48df-8f0e-c77c59f6303f",
"name": "如果是图生图",
"type": "n8n-nodes-base.if",
"position": [
740,
-740
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "b9953a37-acef-4fc3-9ea4-99423f199bbe",
"name": "重复连接配置",
"type": "n8n-nodes-base.set",
"position": [
300,
-740
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "395d81cc-aeea-476e-9d5d-35f126d7312a",
"name": "备用文生图 SDXL Turbo",
"type": "n8n-nodes-base.set",
"position": [
1580,
-400
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "cd6c9c4b-1989-45ba-a602-434e6864e2c7",
"name": "等待1",
"type": "n8n-nodes-base.wait",
"position": [
1060,
-960
],
"webhookId": "d2ccd202-9ad9-4b3b-aa5e-d312103e21dc",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "cfe6752b-c9ec-4596-968f-086efdacb191",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-300,
-1360
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "a2024fb6-ee65-4f49-847d-07de052983ed",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-1340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "a32ac590-cb9b-4890-9151-5cd19f1f7cd6",
"name": "便签说明4",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-680
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "fc66546b-43a1-401d-86fb-f7e43d0096ef",
"name": "便签说明5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2280,
-1340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "de5a4cc0-67dc-45e5-8305-921c5c08e0c3",
"name": "链接到错误处理",
"type": "n8n-nodes-base.noOp",
"position": [
1900,
-860
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d2487de4-54cf-4376-bb6b-03eb63884d4f",
"name": "便签 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
-860
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2e481035-0225-4661-aa85-78a29933c9ee",
"name": "便签 7",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
-860
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "82be0521-5b8b-4027-9a6b-2bace655d621",
"name": "便签 8",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-860
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5c2f294a-d8f1-48fe-8880-844f7c65c65c",
"name": "便签 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "63197f33-a485-4cb2-8170-acf4ad0bf6d9",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
-860
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "595f59cd-f825-45f0-a9b0-1c13933c3260",
"name": "备用图生图 SDXL Turbo",
"type": "n8n-nodes-base.set",
"position": [
1780,
-1120
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "66bbaec2-0cf4-48c2-81ad-3829350e5fd5",
"name": "便签11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1640,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d01129f1-f2dd-4aa8-a722-babeb09cc47f",
"name": "便签12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "fffd202e-0279-4c18-bc75-be8b4ead50a9",
"name": "返回输出 JSON 替代",
"type": "n8n-nodes-base.set",
"position": [
2040,
240
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4c2999bf-ef73-469d-84ac-b31a2c4a1faa",
"name": "便签13",
"type": "n8n-nodes-base.stickyNote",
"position": [
1820,
460
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f11a67d4-78dc-4449-b1d1-5950f5178981",
"name": "便签 14",
"type": "n8n-nodes-base.stickyNote",
"position": [
1940,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0c73e7c3-8bab-4c39-8bd8-e846b9c0cc27",
"name": "从磁盘读取 API 导出的图生图 ComfyUI 工作流",
"type": "n8n-nodes-base.readWriteFile",
"notes": "Export your workflow in API format from ComfyUI file menu:\nWorkflow>Export(API)",
"onError": "continueErrorOutput",
"position": [
1540,
-1220
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "90ac3492-21c1-4df8-955a-ef9d4eba4c79",
"name": "提取图生图 Comfy 工作流",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1780,
-1300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "89814909-78f6-4dd3-8158-7cf9d68ca3e0",
"name": "编辑图生图输入",
"type": "n8n-nodes-base.set",
"notes": "Positive & Negative Prompt, seeds, etc.",
"position": [
2020,
-1220
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "9b479ac9-17e4-4a9c-b3fc-383eec6e534e",
"name": "从磁盘读取 API 导出的文生图 ComfyUI 工作流",
"type": "n8n-nodes-base.readWriteFile",
"notes": "Export your workflow in API format from ComfyUI file menu:\nWorkflow>Export(API)",
"onError": "continueErrorOutput",
"position": [
1340,
-500
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "c2057623-3e78-4057-81a9-5c321f31c621",
"name": "提取文生图 Comfy 工作流",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1580,
-580
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9449e91c-da93-4344-8614-6e11a6a8a95a",
"name": "编辑文生图输入",
"type": "n8n-nodes-base.set",
"notes": "Positive & Negative Prompt, seeds, etc.",
"position": [
1820,
-500
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "39e61de2-0592-4917-97f9-247069f29660",
"name": "便签 15",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "1d71da9e-73f6-46b2-ab02-ea5d43024426",
"name": "便签16",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
40
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"If": {
"main": [
[
{
"node": "Get Generated Image",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Upload Attachments LOCAL",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Discord Alert",
"type": "main",
"index": 0
}
]
]
},
"Client ID": {
"main": [
[
{
"node": "Connection Config Duplicate",
"type": "main",
"index": 0
}
]
]
},
"If Img2Img": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
],
[
{
"node": "Read API Exported Txt2Img ComfyUI Workflow from Disk",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Fail Upload": {
"main": [
[
{
"node": "Link This To Error Handling",
"type": "main",
"index": 0
}
]
]
},
"Fail Trigger": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
],
[
{
"node": "Fail Get History",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Write to error log",
"type": "main",
"index": 0
}
]
]
},
"Fail Get History": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Connection Config": {
"main": [
[
{
"node": "Trigger LOCAL Workflow",
"type": "main",
"index": 0
}
]
]
},
"Edit Img2Img Inputs": {
"main": [
[
{
"node": "🎨🏠 Run local ComfyUI workflow",
"type": "main",
"index": 0
}
]
]
},
"Edit Txt2Img Inputs": {
"main": [
[
{
"node": "🎨🏠 Run local ComfyUI workflow",
"type": "main",
"index": 0
}
]
]
},
"Get Generated Image": {
"main": [
[],
[
{
"node": "Return The Output JSON Instead",
"type": "main",
"index": 0
}
]
]
},
"Trigger LOCAL Workflow": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[
{
"node": "Fail Trigger",
"type": "main",
"index": 0
}
]
]
},
"Upload Attachments LOCAL": {
"main": [
[
{
"node": "Read API Exported Img2Img ComfyUI Workflow from Disk",
"type": "main",
"index": 0
}
],
[
{
"node": "Fail Upload",
"type": "main",
"index": 0
}
]
]
},
"Wait For Test Type Select": {
"main": [
[
{
"node": "If Img2Img",
"type": "main",
"index": 0
}
]
]
},
"Connection Config Duplicate": {
"main": [
[
{
"node": "Wait For Test Type Select",
"type": "main",
"index": 0
}
]
]
},
"Fallback Img2Img SDXL Turbo": {
"main": [
[
{
"node": "Edit Img2Img Inputs",
"type": "main",
"index": 0
}
]
]
},
"Fallback Txt2Img SDXL Turbo": {
"main": [
[
{
"node": "Edit Txt2Img Inputs",
"type": "main",
"index": 0
}
]
]
},
"Extract Img2Img Comfy Workflow": {
"main": [
[
{
"node": "Edit Img2Img Inputs",
"type": "main",
"index": 0
}
]
]
},
"Extract Txt2Img Comfy Workflow": {
"main": [
[
{
"node": "Edit Txt2Img Inputs",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Connection Config",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Client ID",
"type": "main",
"index": 0
}
]
]
},
"Read API Exported Img2Img ComfyUI Workflow from Disk": {
"main": [
[
{
"node": "Extract Img2Img Comfy Workflow",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallback Img2Img SDXL Turbo",
"type": "main",
"index": 0
}
]
]
},
"Read API Exported Txt2Img ComfyUI Workflow from Disk": {
"main": [
[
{
"node": "Extract Txt2Img Comfy Workflow",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallback Txt2Img SDXL Turbo",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Design、AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Nielo
@anomaliI’m a senior software engineer with 30+ years of experience, including Python, Unity3D/AR-VR, and AI/Machine Learning. I've worked on various VR simulators to help train employees in safety (projects aimed at saving lives), and I’ve developed AI-driven automation tools that streamline workflows for faster, smarter results. I thrive on solving complex problems with creative tech solutions, and I’m passionate about delivering value to my clients.
分享此工作流