fire/part-crafter - 图像生成器
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Set, Code, Wait, HttpRequest 等节点。 通过 Replicate API 使用 Fire Part Crafter AI 生成 3D 结构化图像
前置要求
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "dfb23db7-7565-411b-94ba-735459dcd578",
"model_name": "part-crafter",
"model_type": "image",
"version_id": "a8fe4d91050b7d6497dd6676506a4105a3903b7287353681f52f3be0bb01d67f",
"model_owner": "fire",
"generated_at": "2025-08-01T14:50:46.304972"
},
"name": "fire/part-crafter - 图像生成器",
"nodes": [
{
"id": "961a885d-cd22-449b-99dd-56f67cf6d32d",
"name": "手动触发器",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-896,
-176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c783d936-e0cd-4568-906c-3d10c7ac6651",
"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": "8c826b84-a6d5-420e-83d3-3478038928cf",
"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": "seed",
"name": "seed",
"type": "number",
"value": 0
},
{
"id": "image",
"name": "image",
"type": "string",
"value": "https://picsum.photos/512/512"
},
{
"id": "num_parts",
"name": "num_parts",
"type": "number",
"value": 16
},
{
"id": "num_tokens",
"name": "num_tokens",
"type": "string",
"value": 2048
},
{
"id": "guidance_scale",
"name": "guidance_scale",
"type": "number",
"value": 7
},
{
"id": "remove_background",
"name": "remove_background",
"type": "boolean",
"value": false
},
{
"id": "use_flash_decoder",
"name": "use_flash_decoder",
"type": "boolean",
"value": false
},
{
"id": "num_inference_steps",
"name": "num_inference_steps",
"type": "number",
"value": 50
}
]
}
},
"typeVersion": 3.3
},
{
"id": "e9f915fb-602a-4770-859d-5cc1888eac42",
"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\": \"fire/part-crafter:a8fe4d91050b7d6497dd6676506a4105a3903b7287353681f52f3be0bb01d67f\",\n \"input\": {\n \"seed\": {{ $json.seed }},\n \"image\": \"{{ $json.image }}\",\n \"num_parts\": {{ $json.num_parts }},\n \"num_tokens\": \"{{ $json.num_tokens }}\",\n \"guidance_scale\": {{ $json.guidance_scale }},\n \"remove_background\": {{ $json.remove_background }},\n \"use_flash_decoder\": {{ $json.use_flash_decoder }},\n \"num_inference_steps\": {{ $json.num_inference_steps }}\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": "f824abcd-9057-4d16-8dc7-787709b34506",
"name": "等待 5 秒",
"type": "n8n-nodes-base.wait",
"position": [
160,
-128
],
"webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
"parameters": {
"unit": "seconds",
"amount": 5
},
"typeVersion": 1
},
{
"id": "4ffec935-a57f-4e9a-b78b-0ec484f7f3dd",
"name": "检查状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
384,
-128
],
"parameters": {
"url": "=https://api.replicate.com/v1/predictions/{{ $('Create Image 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": "6a32bbc4-254b-4de3-9a49-819e12421730",
"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": "5afaff3e-7088-4e66-b25e-094c8793902b",
"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": "954ec662-d841-42e2-869a-f75f87914cbc",
"name": "等待 10 秒",
"type": "n8n-nodes-base.wait",
"position": [
720,
128
],
"webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
"parameters": {
"unit": "seconds",
"amount": 10
},
"typeVersion": 1
},
{
"id": "8b4c21c0-76b3-498b-8968-4f664751f821",
"name": "成功响应",
"type": "n8n-nodes-base.set",
"position": [
832,
-320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "success-response",
"name": "response",
"type": "object",
"value": "={{ { success: true, image_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Image generated successfully' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "e319f032-1411-4436-b0e9-0960531d3dde",
"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 || 'Image generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate image' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "771e6214-6cfc-4b6d-8443-2dde97e62c43",
"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": "8c1f8ebb-b253-4b09-9d67-b7c1840af6c6",
"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('fire/part-crafter Request:', {\n timestamp: new Date().toISOString(),\n prediction_id: data.id,\n model_type: 'image'\n});\n\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "42f672d9-dcd2-484a-8f73-f70d3effa408",
"name": "便签 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
-304
],
"parameters": {
"color": 4,
"width": 580,
"height": 320,
"content": "======================================="
},
"typeVersion": 1
},
{
"id": "6e5cc786-f8e3-42b2-a3d1-0e90393a8848",
"name": "便签说明4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
48
],
"parameters": {
"color": 4,
"width": 589,
"height": 1958,
"content": "## 🤖 **FIRE/PART-CRAFTER - 图像生成工作流**"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"versionId": "1",
"connections": {
"f824abcd-9057-4d16-8dc7-787709b34506": {
"main": [
[
{
"node": "4ffec935-a57f-4e9a-b78b-0ec484f7f3dd",
"type": "main",
"index": 0
}
]
]
},
"954ec662-d841-42e2-869a-f75f87914cbc": {
"main": [
[
{
"node": "4ffec935-a57f-4e9a-b78b-0ec484f7f3dd",
"type": "main",
"index": 0
}
]
]
},
"5afaff3e-7088-4e66-b25e-094c8793902b": {
"main": [
[
{
"node": "e319f032-1411-4436-b0e9-0960531d3dde",
"type": "main",
"index": 0
}
],
[
{
"node": "954ec662-d841-42e2-869a-f75f87914cbc",
"type": "main",
"index": 0
}
]
]
},
"8c1f8ebb-b253-4b09-9d67-b7c1840af6c6": {
"main": [
[
{
"node": "f824abcd-9057-4d16-8dc7-787709b34506",
"type": "main",
"index": 0
}
]
]
},
"4ffec935-a57f-4e9a-b78b-0ec484f7f3dd": {
"main": [
[
{
"node": "6a32bbc4-254b-4de3-9a49-819e12421730",
"type": "main",
"index": 0
}
]
]
},
"6a32bbc4-254b-4de3-9a49-819e12421730": {
"main": [
[
{
"node": "8b4c21c0-76b3-498b-8968-4f664751f821",
"type": "main",
"index": 0
}
],
[
{
"node": "5afaff3e-7088-4e66-b25e-094c8793902b",
"type": "main",
"index": 0
}
]
]
},
"c783d936-e0cd-4568-906c-3d10c7ac6651": {
"main": [
[
{
"node": "8c826b84-a6d5-420e-83d3-3478038928cf",
"type": "main",
"index": 0
}
]
]
},
"e319f032-1411-4436-b0e9-0960531d3dde": {
"main": [
[
{
"node": "771e6214-6cfc-4b6d-8443-2dde97e62c43",
"type": "main",
"index": 0
}
]
]
},
"961a885d-cd22-449b-99dd-56f67cf6d32d": {
"main": [
[
{
"node": "c783d936-e0cd-4568-906c-3d10c7ac6651",
"type": "main",
"index": 0
}
]
]
},
"8b4c21c0-76b3-498b-8968-4f664751f821": {
"main": [
[
{
"node": "771e6214-6cfc-4b6d-8443-2dde97e62c43",
"type": "main",
"index": 0
}
]
]
},
"8c826b84-a6d5-420e-83d3-3478038928cf": {
"main": [
[
{
"node": "e9f915fb-602a-4770-859d-5cc1888eac42",
"type": "main",
"index": 0
}
]
]
},
"e9f915fb-602a-4770-859d-5cc1888eac42": {
"main": [
[
{
"node": "8c1f8ebb-b253-4b09-9d67-b7c1840af6c6",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
字节跳动/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
内容创作
alitas126/alitas2 - 其他生成器
使用Alitas2模型和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 查看 →
分享此工作流