通过Replicate API使用Google Imagen 3从文本提示生成图像
高级
这是一个自动化工作流,包含 19 个节点。主要使用 If, Set, Wait, HttpRequest, StopAndError 等节点。 通过Replicate API使用Google Imagen 3从文本提示生成图像
前置要求
- •可能需要目标 API 的认证凭证
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "568298fde06d3db80a2eea77fe5bf45f0c7bb898dea20b769944e9ac7c6c5a80",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c8352756-4848-4a5f-8300-c1d8f5b25f50",
"name": "当点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-20,
-100
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e4271dac-0119-493d-a481-286fa95c8920",
"name": "停止并报错",
"type": "n8n-nodes-base.stopAndError",
"position": [
2160,
200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4ce20910-01f0-48c2-927a-e8588f7a2fcf",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
1860,
280
],
"webhookId": "59d47606-522a-4eab-8baf-c0d67ec771be",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "21c0e61a-3d0f-4669-9875-077c7f6822da",
"name": "检查错误",
"type": "n8n-nodes-base.if",
"position": [
1660,
120
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "7aeaa726-cbc9-4d10-90b2-8d2c7e729f02",
"name": "获取图片 URL",
"type": "n8n-nodes-base.set",
"position": [
1920,
-220
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "2167258a-f51b-425b-ae8d-ca6e6c25623f",
"name": "检查预测状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
1000,
-100
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "da3b4773-d505-4526-8af7-289284302a34",
"name": "设置预测字段",
"type": "n8n-nodes-base.set",
"position": [
800,
-100
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4bfdadb4-0db8-45b9-b27c-e856a27d9725",
"name": "暂停",
"type": "n8n-nodes-base.wait",
"position": [
600,
-100
],
"webhookId": "2008b7e9-6fbb-48b6-843a-c477d74fc319",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "7d4c2649-b444-4dbc-8401-ac89b98cd5cf",
"name": "创建预测",
"type": "n8n-nodes-base.httpRequest",
"position": [
380,
-100
],
"parameters": {},
"notesInFlow": false,
"typeVersion": 4.2
},
{
"id": "52ef99ec-6fcc-4ca1-9f5e-0cd550e129a3",
"name": "设置提示",
"type": "n8n-nodes-base.set",
"position": [
180,
-100
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "925f4691-3da6-46c5-93c9-66a180ed7faf",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-200
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2a176375-a1ce-49d0-b74d-287b31b60b75",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
740,
-200
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "010a33a7-d815-46b0-b618-3d67b0e04808",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1180,
-200
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "be727fe6-6c2d-4084-987a-61c6e1c5dad2",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1620,
0
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c2f0605f-02f4-46fb-8971-6136a99e5c1e",
"name": "检查是否成功",
"type": "n8n-nodes-base.if",
"position": [
1240,
-80
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "741515e3-fe77-408f-8b69-ccb202241853",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2080,
0
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c9c03037-f315-4691-886c-ec5f0fcc9812",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1620,
-280
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "01a34517-52f1-4960-b425-af528854bacd",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-600
],
"parameters": {
"content": "便签7"
},
"typeVersion": 1
},
{
"id": "90864709-1be1-4af9-9625-4b7d159414df",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1180,
-600
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Wait": {
"main": [
[
{
"node": "Set fields for prediction",
"type": "main",
"index": 0
}
]
]
},
"Pause": {
"main": [
[
{
"node": "Set fields for prediction",
"type": "main",
"index": 0
}
]
]
},
"Set prompt": {
"main": [
[
{
"node": "Create prediction",
"type": "main",
"index": 0
}
]
]
},
"Check for errors": {
"main": [
[
{
"node": "Stop and Error",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Check for success": {
"main": [
[
{
"node": "Get the image URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Check for errors",
"type": "main",
"index": 0
}
]
]
},
"Create prediction": {
"main": [
[
{
"node": "Pause",
"type": "main",
"index": 0
}
]
]
},
"Check prediction status": {
"main": [
[
{
"node": "Check for success",
"type": "main",
"index": 0
}
]
]
},
"Set fields for prediction": {
"main": [
[
{
"node": "Check prediction status",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Set prompt",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
创建或查找Stripe客户并自动生成发票
创建或查找Stripe客户并自动生成发票
If
Set
Http Request
+2
10 节点Audun
财务
网页内部链接提取
从网页中提取内部链接
If
Set
Html
+6
13 节点Audun
工程
使用Have I Been Pwned实时监控数据泄露
使用Have I Been Pwned实时监控数据泄露
If
Set
Merge
+9
24 节点Audun
客户支持
AI智能助手:与Supabase存储和Google Drive文件对话
AI智能助手:与Supabase存储和Google Drive文件对话
If
Set
Wait
+20
62 节点Mark Shcherbakov
工程
使用Google Maps生成潜在客户 - AlexK1919
使用Google Maps生成潜在客户
If
Set
Code
+13
42 节点Alex Kim
销售
使用 youtube-transcript.io 获取免费 YouTube 字幕并保存到 Supabase
使用 youtube-transcript.io 获取免费 YouTube 字幕并保存到 Supabase
If
Set
Code
+10
37 节点automedia