8
n8n 中文网amn8n.com

paigedutcher2/paigedutcher - 其他生成器

中级

这是一个Engineering, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Set, Code, Wait, HttpRequest 等节点。 通过Replicate API使用Paigedutcher2 AI模型生成内容

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "75b391ce-6fb0-437a-8297-ce4c5e4f281c",
    "model_name": "paigedutcher",
    "model_type": "other",
    "version_id": "e82368e3a64b65a1df7c06189f9b2305f9425a9dad5283af564b7f22e81c07bf",
    "model_owner": "paigedutcher2",
    "generated_at": "2025-08-01T14:50:46.666948"
  },
  "name": "paigedutcher2/paigedutcher - 其他生成器",
  "nodes": [
    {
      "id": "bfaca65e-12cf-4817-94b4-001b98934de9",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        -176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "15499253-ee7e-4e7f-9573-011e3cba4dc4",
      "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": "0a1a638d-5878-4080-b665-245fe28b87be",
      "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": "ce88826d-f759-4cb4-95b2-52da0fbc82d1",
      "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\": \"paigedutcher2/paigedutcher:e82368e3a64b65a1df7c06189f9b2305f9425a9dad5283af564b7f22e81c07bf\",\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": "89502620-55de-4a13-86ee-1be1fe5897c6",
      "name": "等待 5 秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        -128
      ],
      "webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "6a32bed9-8bfa-4911-97b6-65b738b92432",
      "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": "fb08a463-94fb-4150-8efc-25fd6eb227f1",
      "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": "36971dc3-d111-449c-8729-1347f308d391",
      "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": "72b076b2-c8c0-4ff2-bbd1-7f2a78f8af2d",
      "name": "等待 10 秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        128
      ],
      "webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "6251223d-53fe-4478-bc82-8e690df3e94b",
      "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": "b21f820d-b9f4-4618-af47-3db22d8d42fd",
      "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": "5ed13652-7a5b-429e-8ee1-7690406c44c6",
      "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": "5b6ae5f2-0f35-4269-afe1-e2294f3aa881",
      "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('paigedutcher2/paigedutcher Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'other'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "093fa6be-8483-482f-b9a5-7857de729ad2",
      "name": "## 1. 创建新的自定义 OpenAI 凭据",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 320,
        "content": "======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "f8666483-89c8-405e-8f51-2973d14ca77a",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## 🤖 **PAIGEDUTCHER2/PAIGEDUTCHER - 其他生成工作流**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "versionId": "1",
  "connections": {
    "89502620-55de-4a13-86ee-1be1fe5897c6": {
      "main": [
        [
          {
            "node": "6a32bed9-8bfa-4911-97b6-65b738b92432",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "72b076b2-c8c0-4ff2-bbd1-7f2a78f8af2d": {
      "main": [
        [
          {
            "node": "6a32bed9-8bfa-4911-97b6-65b738b92432",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "36971dc3-d111-449c-8729-1347f308d391": {
      "main": [
        [
          {
            "node": "b21f820d-b9f4-4618-af47-3db22d8d42fd",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "72b076b2-c8c0-4ff2-bbd1-7f2a78f8af2d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5b6ae5f2-0f35-4269-afe1-e2294f3aa881": {
      "main": [
        [
          {
            "node": "89502620-55de-4a13-86ee-1be1fe5897c6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6a32bed9-8bfa-4911-97b6-65b738b92432": {
      "main": [
        [
          {
            "node": "fb08a463-94fb-4150-8efc-25fd6eb227f1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fb08a463-94fb-4150-8efc-25fd6eb227f1": {
      "main": [
        [
          {
            "node": "6251223d-53fe-4478-bc82-8e690df3e94b",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "36971dc3-d111-449c-8729-1347f308d391",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "15499253-ee7e-4e7f-9573-011e3cba4dc4": {
      "main": [
        [
          {
            "node": "0a1a638d-5878-4080-b665-245fe28b87be",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b21f820d-b9f4-4618-af47-3db22d8d42fd": {
      "main": [
        [
          {
            "node": "5ed13652-7a5b-429e-8ee1-7690406c44c6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bfaca65e-12cf-4817-94b4-001b98934de9": {
      "main": [
        [
          {
            "node": "15499253-ee7e-4e7f-9573-011e3cba4dc4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6251223d-53fe-4478-bc82-8e690df3e94b": {
      "main": [
        [
          {
            "node": "5ed13652-7a5b-429e-8ee1-7690406c44c6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0a1a638d-5878-4080-b665-245fe28b87be": {
      "main": [
        [
          {
            "node": "ce88826d-f759-4cb4-95b2-52da0fbc82d1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ce88826d-f759-4cb4-95b2-52da0fbc82d1": {
      "main": [
        [
          {
            "node": "5b6ae5f2-0f35-4269-afe1-e2294f3aa881",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 工程, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量15
分类2
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Yaron Been

Yaron Been

@yaron-nofluff

Building 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 查看

分享此工作流

分类

分类: 34