vcollos/trefilio - 其他生成器
中级
这是一个Engineering, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Set, Code, Wait, HttpRequest 等节点。 通过Replicate API使用Vcollos Trefilio AI模型生成内容
前置要求
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "550eafa5-831e-47e1-b5a3-3869df9461ef",
"model_name": "trefilio",
"model_type": "other",
"version_id": "e1c19d7267f444e2796438803a31ccd8a1b62ef573531e35257032469e054f1a",
"model_owner": "vcollos",
"generated_at": "2025-08-01T14:50:46.436070"
},
"name": "vcollos/trefilio - 其他生成器",
"nodes": [
{
"id": "5df80f1f-b271-44a7-9a33-eddd352da9af",
"name": "手动触发器",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-896,
-176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "83efb773-1a11-4a33-b10e-4d5b4d5328c0",
"name": "设置API令牌",
"type": "n8n-nodes-base.set",
"position": [
-608,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "api_token",
"name": "api_token",
"type": "string",
"value": "YOUR_REPLICATE_API_TOKEN"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "09518d01-6756-4e1f-be4d-66fae414fbae",
"name": "设置其他参数",
"type": "n8n-nodes-base.set",
"position": [
-288,
-128
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "api_token",
"name": "api_token",
"type": "string",
"value": "={{ $('Set API Token').item.json.api_token }}"
},
{
"id": "mask",
"name": "mask",
"type": "string",
"value": "https://via.placeholder.com/512x512/000000/FFFFFF.png"
},
{
"id": "seed",
"name": "seed",
"type": "number",
"value": -1
},
{
"id": "image",
"name": "image",
"type": "string",
"value": "https://picsum.photos/512/512"
},
{
"id": "model",
"name": "model",
"type": "string",
"value": "dev"
},
{
"id": "width",
"name": "width",
"type": "number",
"value": 512
},
{
"id": "height",
"name": "height",
"type": "number",
"value": 512
},
{
"id": "prompt",
"name": "prompt",
"type": "string",
"value": "Create something amazing"
},
{
"id": "go_fast",
"name": "go_fast",
"type": "boolean",
"value": false
},
{
"id": "extra_lora",
"name": "extra_lora",
"type": "string",
"value": ""
},
{
"id": "lora_scale",
"name": "lora_scale",
"type": "number",
"value": 1
},
{
"id": "megapixels",
"name": "megapixels",
"type": "string",
"value": "1"
},
{
"id": "num_outputs",
"name": "num_outputs",
"type": "number",
"value": 1
},
{
"id": "aspect_ratio",
"name": "aspect_ratio",
"type": "string",
"value": "1:1"
},
{
"id": "output_format",
"name": "output_format",
"type": "string",
"value": "webp"
},
{
"id": "guidance_scale",
"name": "guidance_scale",
"type": "number",
"value": 3
},
{
"id": "output_quality",
"name": "output_quality",
"type": "number",
"value": 80
},
{
"id": "prompt_strength",
"name": "prompt_strength",
"type": "number",
"value": 0.8
},
{
"id": "extra_lora_scale",
"name": "extra_lora_scale",
"type": "number",
"value": 1
},
{
"id": "replicate_weights",
"name": "replicate_weights",
"type": "string",
"value": ""
},
{
"id": "num_inference_steps",
"name": "num_inference_steps",
"type": "number",
"value": 28
},
{
"id": "disable_safety_checker",
"name": "disable_safety_checker",
"type": "boolean",
"value": false
}
]
}
},
"typeVersion": 3.3
},
{
"id": "c31393af-6808-4556-b80e-45828cdec2c3",
"name": "创建其他预测",
"type": "n8n-nodes-base.httpRequest",
"position": [
-64,
-128
],
"parameters": {
"url": "https://api.replicate.com/v1/predictions",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"jsonBody": "={\n \"version\": \"vcollos/trefilio:e1c19d7267f444e2796438803a31ccd8a1b62ef573531e35257032469e054f1a\",\n \"input\": {\n \"mask\": \"{{ $json.mask }}\",\n \"seed\": {{ $json.seed }},\n \"image\": \"{{ $json.image }}\",\n \"model\": \"{{ $json.model }}\",\n \"width\": {{ $json.width }},\n \"height\": {{ $json.height }},\n \"prompt\": \"{{ $json.prompt }}\",\n \"go_fast\": {{ $json.go_fast }},\n \"extra_lora\": \"{{ $json.extra_lora }}\",\n \"lora_scale\": {{ $json.lora_scale }},\n \"megapixels\": \"{{ $json.megapixels }}\",\n \"num_outputs\": {{ $json.num_outputs }},\n \"aspect_ratio\": \"{{ $json.aspect_ratio }}\",\n \"output_format\": \"{{ $json.output_format }}\",\n \"guidance_scale\": {{ $json.guidance_scale }},\n \"output_quality\": {{ $json.output_quality }},\n \"prompt_strength\": {{ $json.prompt_strength }},\n \"extra_lora_scale\": {{ $json.extra_lora_scale }},\n \"replicate_weights\": \"{{ $json.replicate_weights }}\",\n \"num_inference_steps\": {{ $json.num_inference_steps }},\n \"disable_safety_checker\": {{ $json.disable_safety_checker }}\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $json.api_token }}"
},
{
"name": "Prefer",
"value": "wait"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "794284b5-9737-453c-9e4a-a0408d2b2baf",
"name": "等待5秒",
"type": "n8n-nodes-base.wait",
"position": [
160,
-128
],
"webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
"parameters": {
"unit": "seconds",
"amount": 5
},
"typeVersion": 1
},
{
"id": "5fb3c193-593d-4ba3-b9ad-1ebcccbf79bd",
"name": "检查状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
384,
-128
],
"parameters": {
"url": "=https://api.replicate.com/v1/predictions/{{ $('Create Other Prediction').item.json.id }}",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "ca3689ae-2b2b-4640-8009-2998f75af323",
"name": "是否完成?",
"type": "n8n-nodes-base.if",
"position": [
528,
-240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "succeeded"
}
]
}
},
"typeVersion": 2
},
{
"id": "4a2a2266-3def-48e4-97d0-1749865e4591",
"name": "是否失败?",
"type": "n8n-nodes-base.if",
"position": [
848,
-80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "d1bfd044-3a07-4c18-b55f-72d192596139",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "failed"
}
]
}
},
"typeVersion": 2
},
{
"id": "b895e7b6-f343-4514-bde3-b988d09c5d6e",
"name": "等待10秒",
"type": "n8n-nodes-base.wait",
"position": [
720,
128
],
"webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
"parameters": {
"unit": "seconds",
"amount": 10
},
"typeVersion": 1
},
{
"id": "2f9fb980-aed5-4fb1-abd5-d675ff63e29b",
"name": "成功响应",
"type": "n8n-nodes-base.set",
"position": [
832,
-320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "success-response",
"name": "response",
"type": "object",
"value": "={{ { success: true, result_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Other generated successfully' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "4aa3ecc1-9c3c-469f-a651-79aea5bd1ae1",
"name": "错误响应",
"type": "n8n-nodes-base.set",
"position": [
1344,
144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "error-response",
"name": "response",
"type": "object",
"value": "={{ { success: false, error: $json.error || 'Other generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate other' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "d4dabf09-6e27-495e-82d1-e68971a055de",
"name": "显示结果",
"type": "n8n-nodes-base.set",
"position": [
1552,
-144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "final-result",
"name": "final_result",
"type": "object",
"value": "={{ $json.response }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "fea6bb02-be70-49ac-a88c-35273a4827f9",
"name": "记录请求",
"type": "n8n-nodes-base.code",
"position": [
160,
-320
],
"parameters": {
"jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('vcollos/trefilio Request:', {\n timestamp: new Date().toISOString(),\n prediction_id: data.id,\n model_type: 'other'\n});\n\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "0065200d-df83-4fd5-b285-f8f253ce17a0",
"name": "## 1. 创建新的自定义 OpenAI 凭据",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
-304
],
"parameters": {
"color": 4,
"width": 580,
"height": 320,
"content": "======================================="
},
"typeVersion": 1
},
{
"id": "a3dfb28f-2096-48c8-b1f0-fd0d20b9e8d0",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
48
],
"parameters": {
"color": 4,
"width": 589,
"height": 1958,
"content": "## 🤖 **VCOLLOS/TREFILIO - 其他生成工作流**"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"versionId": "1",
"connections": {
"794284b5-9737-453c-9e4a-a0408d2b2baf": {
"main": [
[
{
"node": "5fb3c193-593d-4ba3-b9ad-1ebcccbf79bd",
"type": "main",
"index": 0
}
]
]
},
"b895e7b6-f343-4514-bde3-b988d09c5d6e": {
"main": [
[
{
"node": "5fb3c193-593d-4ba3-b9ad-1ebcccbf79bd",
"type": "main",
"index": 0
}
]
]
},
"4a2a2266-3def-48e4-97d0-1749865e4591": {
"main": [
[
{
"node": "4aa3ecc1-9c3c-469f-a651-79aea5bd1ae1",
"type": "main",
"index": 0
}
],
[
{
"node": "b895e7b6-f343-4514-bde3-b988d09c5d6e",
"type": "main",
"index": 0
}
]
]
},
"fea6bb02-be70-49ac-a88c-35273a4827f9": {
"main": [
[
{
"node": "794284b5-9737-453c-9e4a-a0408d2b2baf",
"type": "main",
"index": 0
}
]
]
},
"5fb3c193-593d-4ba3-b9ad-1ebcccbf79bd": {
"main": [
[
{
"node": "ca3689ae-2b2b-4640-8009-2998f75af323",
"type": "main",
"index": 0
}
]
]
},
"ca3689ae-2b2b-4640-8009-2998f75af323": {
"main": [
[
{
"node": "2f9fb980-aed5-4fb1-abd5-d675ff63e29b",
"type": "main",
"index": 0
}
],
[
{
"node": "4a2a2266-3def-48e4-97d0-1749865e4591",
"type": "main",
"index": 0
}
]
]
},
"83efb773-1a11-4a33-b10e-4d5b4d5328c0": {
"main": [
[
{
"node": "09518d01-6756-4e1f-be4d-66fae414fbae",
"type": "main",
"index": 0
}
]
]
},
"4aa3ecc1-9c3c-469f-a651-79aea5bd1ae1": {
"main": [
[
{
"node": "d4dabf09-6e27-495e-82d1-e68971a055de",
"type": "main",
"index": 0
}
]
]
},
"5df80f1f-b271-44a7-9a33-eddd352da9af": {
"main": [
[
{
"node": "83efb773-1a11-4a33-b10e-4d5b4d5328c0",
"type": "main",
"index": 0
}
]
]
},
"2f9fb980-aed5-4fb1-abd5-d675ff63e29b": {
"main": [
[
{
"node": "d4dabf09-6e27-495e-82d1-e68971a055de",
"type": "main",
"index": 0
}
]
]
},
"09518d01-6756-4e1f-be4d-66fae414fbae": {
"main": [
[
{
"node": "c31393af-6808-4556-b80e-45828cdec2c3",
"type": "main",
"index": 0
}
]
]
},
"c31393af-6808-4556-b80e-45828cdec2c3": {
"main": [
[
{
"node": "fea6bb02-be70-49ac-a88c-35273a4827f9",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 工程, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
paigedutcher2/paigedutcher - 其他生成器
通过Replicate API使用Paigedutcher2 AI模型生成内容
If
Set
Code
+
If
Set
Code
15 节点Yaron Been
工程
字节跳动/Seedream-3 - 图像生成器
字节跳动 Seedream 3:文本到图像转换模板
If
Set
Code
+
If
Set
Code
15 节点Yaron Been
内容创作
Dessix Moss Ttsd 文本生成器
使用Replicate Moss-TTSD将对话脚本转换为自然语音
If
Set
Code
+
If
Set
Code
9 节点Yaron Been
内容创作
ibm-granite/granite-speech-3.3-8b - 文本生成器
通过Replicate API使用IBM Granite 3.3 8B模型将语音转换为文本
If
Set
Code
+
If
Set
Code
15 节点Yaron Been
内容创作
moicarmonas/2ndmoises_generator - 其他生成器
使用2nd Moises生成器和Replicate从文本提示创建图片
If
Set
Code
+
If
Set
Code
15 节点Yaron Been
内容创作
moicarmonas/3rdmoises_generator_oldversion - 其他生成器
使用3rd Moises生成器和Replicate从文本提示创建图片
If
Set
Code
+
If
Set
Code
15 节点Yaron Been
内容创作
工作流信息
难度等级
中级
节点数量15
分类2
节点类型7
作者
Yaron Been
@yaron-nofluffBuilding AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos
外部链接
在 n8n.io 查看 →
分享此工作流