{
  "name": "Flux AI image generator",
  "nodes": [
    {
      "id": "6abe578b-d503-4da5-9af8-f9977de71139",
      "name": "Vivid Pop Explosion",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        980
      ]
    },
    {
      "id": "7de1ea42-3b18-4bfb-8ea4-a8b6c8d16763",
      "name": "AI Dystopia",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        620
      ]
    },
    {
      "id": "aa17c288-78e0-48d9-9c60-0e63e351d0b6",
      "name": "Post-Analog Glitchscape",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        420
      ]
    },
    {
      "id": "769ff46c-630f-456d-ae19-4c6496270fda",
      "name": "Neon Fauvism",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        800
      ]
    },
    {
      "id": "ccc67dcb-84e6-476a-9bc2-b5382b700d5e",
      "name": "None",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        1160
      ]
    },
    {
      "id": "fea2039c-48e5-4077-af2c-ea72838e1a5d",
      "name": "Serve webpage",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1460,
        580
      ]
    },
    {
      "id": "2df7b738-9584-48b4-8adc-cafb0c026928",
      "name": "Respond with error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1460,
        820
      ]
    },
    {
      "id": "54cba7c4-db24-4abb-9638-ee66236d8676",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        440
      ],
      "parameters": {
        "width": 205.9419250888625,
        "height": 107.99633347519193,
        "content": "### Set style prompt\nEach Edit fields node after the Switch sets `stylePrompt`, used in huggingface node."
      }
    },
    {
      "id": "f4aa76f8-d35f-4332-aa39-0c34582618eb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        840
      ],
      "parameters": {
        "width": 419.0156901664085,
        "height": 226.2264013670822,
        "content": "### Run flux model\nIn `Call huggingface inference api` You can change `black-forest-labs/FLUX.1-schnell` in URL parameter to other models:\n- `black-forest-labs/FLUX.1-dev`\n- `Shakker-Labs/FLUX.1-dev-L"
      }
    },
    {
      "id": "2b0b29ce-82c2-4428-bf12-cb25262e5291",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        440
      ],
      "parameters": {
        "width": 247.37323750873333,
        "height": 90.99855957953969,
        "content": "### Host image on S3\n[Cloudflare](https://cloudflare.com) has free S3 compatible hosting. They call it \"R2\"."
      }
    },
    {
      "id": "6fccc88f-9e72-49a3-952d-b7b1d9612091",
      "name": "Upload image to S3",
      "type": "n8n-nodes-base.s3",
      "position": [
        1120,
        580
      ]
    },
    {
      "id": "7824dc49-c546-424e-8ba9-5f34b190d5f0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        440
      ],
      "parameters": {
        "width": 302.9292231993488,
        "height": 90.99855957953969,
        "content": "### Respond to Form\nServe a webform with image on success. On error, send message to form."
      }
    },
    {
      "id": "71739ba4-b8db-439e-b8c3-06f3208126e3",
      "name": "Hyper-Surreal Escape",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        240
      ]
    },
    {
      "id": "dcfdb152-a055-4f0f-baa5-7cf8afba36ae",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        440
      ],
      "parameters": {
        "width": 186.9444130878394,
        "height": 103.99685726445023,
        "content": "### Serve form to user\nCaptures `Prompt to flux` and `Style` from user."
      }
    },
    {
      "id": "310f6c63-9441-4332-82dc-09b56e4f625a",
      "name": "n8n Form Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -280,
        660
      ]
    },
    {
      "id": "ad10a84f-851a-40f8-b10e-18356c4eeed6",
      "name": "Call hugginface inference api",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        660
      ]
    },
    {
      "id": "e740dd3c-e23e-485b-bb4c-bb0515897a08",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        600
      ],
      "parameters": {
        "width": 506.8102696237577,
        "height": 337.24177957113216,
        "content": "### Watch Set Up Video 👇\n[![Flux Generator](https://uploads.n8n.io/devrel/fluxgenerator.png#full-width)](https://youtu.be/Rv_1jt5WvtY)\n\n"
      }
    },
    {
      "id": "71d01821-3e0d-4c08-8571-58a158817e2c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        440
      ],
      "parameters": {
        "width": 506.8102696237577,
        "height": 134.27496896630808,
        "content": "# flux image generator\nBuilt by [@maxtkacz](https://x.com/maxtkacz) as part of the [30 Day AI Sprint](https://30dayaisprint.notion.site/)\nCheck out the project's [Notion page](https://30dayaisprint.no"
      }
    },
    {
      "id": "0cc26680-ba63-464f-ba84-68c2616f95e2",
      "name": "Route by style",
      "type": "n8n-nodes-base.switch",
      "position": [
        0,
        640
      ]
    }
  ],
  "connections": {
    "None": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Dystopia": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Neon Fauvism": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by style": {
      "main": [
        [
          {
            "node": "Hyper-Surreal Escape",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post-Analog Glitchscape",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Dystopia",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Neon Fauvism",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Vivid Pop Explosion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "None",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n Form Trigger": {
      "main": [
        [
          {
            "node": "Route by style",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image to S3": {
      "main": [
        [
          {
            "node": "Serve webpage",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond with error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vivid Pop Explosion": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hyper-Surreal Escape": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post-Analog Glitchscape": {
      "main": [
        [
          {
            "node": "Call hugginface inference api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call hugginface inference api": {
      "main": [
        [
          {
            "node": "Upload image to S3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond with error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}