
Amazon Lex API集成指南:打造智能對話體驗
n8n 是一個強大的自動化工作流工具,能夠幫助你快速構建和執行復雜的工作流。通過 n8n,你可以輕松地將不同的任務串聯起來,實現自動化處理。
ComfyUI 是一個開源的 AI 繪圖和視頻生成工具,支持多種 AI 模型,能夠生成高質量的圖片和視頻。通過 ComfyUI,你可以輕松地將圖片轉換為視頻。
Running Hub 是一個在線平臺,提供了對 ComfyUI 的 API 支持,使得你可以通過 API 調用 ComfyUI 的功能,無需本地部署。
這個工作流的核心是通過 n8n 調用 Running Hub 上的 ComfyUI API,將圖片批量轉換為視頻。具體步驟如下:
訪問 Running Hub 并注冊賬號,完成實名認證。
在 Running Hub 的工作臺中新建一個工作流,命名為 runningHubI2V
(圖片到視頻)。
在 n8n 中構建以下節點:
{
""nodes"": [
{
""parameters"": {
""url"": ""https://runninghub.cn/api/upload"",
""method"": ""POST"",
""body"": {
""api_key"": ""{{config.apiKey}}"",
""file"": ""{{readFile.data}}"",
""file_type"": ""image""
},
""headers"": {
""Host"": ""runninghub.cn""
}
},
""name"": ""Upload Image"",
""type"": ""n8n-nodes-base.httpRequest"",
""typeVersion"": 1,
""position"": [
300,
200
]
}
],
""connections"": {}
}
{
""nodes"": [
{
""parameters"": {
""url"": ""https://runninghub.cn/api/start_workflow"",
""method"": ""POST"",
""body"": {
""api_key"": ""{{config.apiKey}}"",
""workflow_id"": ""{{config.workflowId}}"",
""node_info_list"": [
{
""node_id"": ""21"",
""field_name"": ""image"",
""field_value"": ""{{uploadImage.data.file_name}}""
}
]
},
""headers"": {
""Host"": ""runninghub.cn""
}
},
""name"": ""Start Workflow"",
""type"": ""n8n-nodes-base.httpRequest"",
""typeVersion"": 1,
""position"": [
500,
200
]
}
],
""connections"": {}
}
{
""nodes"": [
{
""parameters"": {
""url"": ""https://runninghub.cn/api/task_status"",
""method"": ""POST"",
""body"": {
""api_key"": ""{{config.apiKey}}"",
""task_id"": ""{{startWorkflow.data.task_id}}""
},
""headers"": {
""Host"": ""runninghub.cn""
}
},
""name"": ""Check Status"",
""type"": ""n8n-nodes-base.httpRequest"",
""typeVersion"": 1,
""position"": [
700,
200
]
}
],
""connections"": {}
}
{
""nodes"": [
{
""parameters"": {
""url"": ""https://runninghub.cn/api/download"",
""method"": ""GET"",
""headers"": {
""Host"": ""runninghub.cn""
},
""body"": {
""file_name"": ""{{getResult.data.file_name}}""
}
},
""name"": ""Download Video"",
""type"": ""n8n-nodes-base.httpRequest"",
""typeVersion"": 1,
""position"": [
900,
200
]
}
],
""connections"": {}
}
為了實現批量處理,可以使用 n8n 的 loop over items
節點,將多個圖片文件逐一處理。
通過 n8n 和 ComfyUI 的組合,你可以輕松實現一鍵批量圖片轉視頻的功能,大大提升內容創作的效率。希望本文能幫助你快速上手并應用到實際工作中。如果有任何問題或需要進一步的幫助,歡迎隨時聯系我。