{
  "name": "crAIzy chAIns · Meal Motion",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -192,
        160
      ],
      "id": "e2f78bd3-4a84-419b-9184-34b4f62e321f",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "url": "https://c8.alamy.com/compde/r1pg46/kuhlschrank-innen-voll-mit-verschiedenen-zutaten-gemuse-fleisch-und-milchprodukte-aus-der-nahe-gesundheit-diat-konzept-r1pg46.jpg",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        16,
        -16
      ],
      "id": "c11a2e85-455a-422c-915f-39e554eb31bf",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "workflow": "={\n  \"4\": {\n    \"inputs\": {\n      \"ckpt_name\": \"flux1-dev-fp8.safetensors\"\n    },\n    \"class_type\": \"CheckpointLoaderSimple\"\n  },\n  \"5\": {\n    \"inputs\": {\n      \"width\": 1344,\n      \"height\": 768,\n      \"batch_size\": 1\n    },\n    \"class_type\": \"EmptySD3LatentImage\"\n  },\n  \"6\": {\n    \"inputs\": {\n      \"text\": \"{{ $json.output[6].inputs.text.replace(/\\n/g, ' ') }}\",\n      \"clip\": [\n        \"4\",\n        1\n      ]\n    },\n    \"class_type\": \"CLIPTextEncode\",\n    \"_meta\": {\n      \"title\": \"CLIP Text Encode (Prompt)\"\n    }\n  },\n  \"7\": {\n    \"inputs\": {\n      \"text\": \"\",\n      \"clip\": [\n        \"4\",\n        1\n      ]\n    },\n    \"class_type\": \"CLIPTextEncode\"\n  },\n  \"8\": {\n    \"inputs\": {\n      \"samples\": [\n        \"23\",\n        0\n      ],\n      \"vae\": [\n        \"4\",\n        2\n      ]\n    },\n    \"class_type\": \"VAEDecode\"\n  },\n  \"9\": {\n    \"inputs\": {\n      \"filename_prefix\": \"SwarmUI_215D93FD_\",\n      \"images\": [\n        \"8\",\n        0\n      ]\n    },\n    \"class_type\": \"SaveImage\"\n  },\n  \"10\": {\n    \"inputs\": {\n      \"add_noise\": \"enable\",\n      \"noise_seed\": {{ Math.floor(Math.random() * 1000000000) }},\n      \"steps\": 11,\n      \"cfg\": 1.5,\n      \"sampler_name\": \"ipndm\",\n      \"scheduler\": \"ddim_uniform\",\n      \"start_at_step\": 0,\n      \"end_at_step\": 10000,\n      \"return_with_leftover_noise\": \"disable\",\n      \"model\": [\n        \"4\",\n        0\n      ],\n      \"positive\": [\n        \"6\",\n        0\n      ],\n      \"negative\": [\n        \"7\",\n        0\n      ],\n      \"latent_image\": [\n        \"5\",\n        0\n      ]\n    },\n    \"class_type\": \"KSamplerAdvanced\"\n  },\n  \"23\": {\n    \"inputs\": {\n      \"add_noise\": \"enable\",\n      \"noise_seed\": {{ Math.floor(Math.random() * 1000000000) }},\n      \"steps\": 11,\n      \"cfg\": 1.5,\n      \"sampler_name\": \"ipndm\",\n      \"scheduler\": \"ddim_uniform\",\n      \"start_at_step\": 9,\n      \"end_at_step\": 10000,\n      \"return_with_leftover_noise\": \"disable\",\n      \"model\": [\n        \"4\",\n        0\n      ],\n      \"positive\": [\n        \"6\",\n        0\n      ],\n      \"negative\": [\n        \"7\",\n        0\n      ],\n      \"latent_image\": [\n        \"10\",\n        0\n      ]\n    },\n    \"class_type\": \"KSamplerAdvanced\"\n  }\n}"
      },
      "type": "n8n-nodes-comfyui.comfyui",
      "typeVersion": 1,
      "position": [
        1008,
        -16
      ],
      "id": "8105cdf2-fbd8-4e84-a121-6bb1eb30604a",
      "name": "ComfyUI",
      "notes": "⚙️ SETUP: Credential „ComfyUI“ → URL deiner ComfyUI-Instanz (Community-Node nötig). Workflow-JSON im Node an dein Modell anpassen.",
      "notesInFlow": true
    },
    {
      "parameters": {
        "path": "={{ $now.format('yyyy-MM-dd_HH-mm-ss') }}_kuehlschrank.jpg"
      },
      "type": "n8n-nodes-base.nextCloud",
      "typeVersion": 1,
      "position": [
        1424,
        -16
      ],
      "id": "e9740067-b854-4a58-b0ab-c40de8318e02",
      "name": "Upload a file",
      "notes": "⚙️ SETUP: Credential „Nextcloud“ anlegen und Ordnerpfad anpassen. Alternative: durch „Read/Write Files from Disk“ ersetzen.",
      "notesInFlow": true
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Du bist ein professioneller Food-Content-Produzent. Erstelle einen englischen Bild-Prompt für das Gericht: {{ $json.content }}.\n\nAnforderungen:\n1. Antworte NUR mit einem JSON-Objekt im Format: {\"prompt\": \"DEIN_TEXT\"}\n2. Der \"DEIN_TEXT\" muss in einer einzigen Zeile stehen (KEINE Umbrüche).\n3. Verwende im Text KEINE Anführungszeichen (z.B. statt \"4k\" schreibe 4k).\n4. Stil: Cinematic close-up, 4k, steam rising, focus on sizzling textures.\n5. Keine Einleitung, kein Labern, nur das JSON.\n",
        "hasOutputParser": true,
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        688,
        -16
      ],
      "id": "0e34e1bb-d50a-43f6-99d1-1ead82d5f615",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "model": "gemma3:27b",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "typeVersion": 1,
      "position": [
        704,
        128
      ],
      "id": "f52e5e0a-31f3-4a57-abc5-acf0d7b5a50d",
      "name": "Ollama Model",
      "notes": "⚙️ SETUP: Credential „Ollama“ → Base-URL deines Ollama (z.B. http://localhost:11434). Damals: gemma3:27b. Jedes kleinere Modell tut's auch (wird dann nur noch crAIzier).",
      "notesInFlow": true
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"6\": {\n    \"inputs\": {\n      \"text\": \"Extreme close-up of sizzling wagyu beef on a cast iron skillet, intense marbling melting, aromatic steam rising in slow motion, cinematic 4k lighting, vibrant textures, shallow depth of field.\",\n      \"clip\": [ \"4\", 1 ]\n    },\n    \"class_type\": \"CLIPTextEncode\"\n  }\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        848,
        128
      ],
      "id": "27e0407e-2c1a-4884-a074-16743390023d",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "content": "Foto Kühlschrank",
        "height": 80,
        "width": 176
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -160
      ],
      "typeVersion": 1,
      "id": "c0e4f507-6585-46f4-9b11-cbf7c93bc37f",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "value": "gemma3:27b",
          "mode": "list",
          "cachedResultName": "gemma3:27b"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.ollama",
      "typeVersion": 1,
      "position": [
        224,
        -16
      ],
      "id": "9dee088a-986a-4c31-b10b-dc6d673f5cbd",
      "name": "Analyze image",
      "notes": "⚙️ SETUP: Credential „Ollama“ anlegen. Für Bildanalyse ein Vision-Modell nehmen (z.B. gemma3, llava).",
      "notesInFlow": true
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gemma3:27b",
          "mode": "list",
          "cachedResultName": "gemma3:27b"
        },
        "messages": {
          "values": [
            {
              "content": "=Erstelle ein kurzes Rezept aus diesen Zutaten: {{ $json.content }}. Gib mir nur den Namen, die Liste und eine kompakte Anleitung. Antworte direkt mit dem Rezept ohne Einleitung."
            },
            {}
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.ollama",
      "typeVersion": 1,
      "position": [
        400,
        -16
      ],
      "id": "fbe2a9a3-1219-4931-ad4f-85aeec130dc8",
      "name": "Message a model",
      "notes": "⚙️ SETUP: Credential „Ollama“ anlegen. Für Bildanalyse ein Vision-Modell nehmen (z.B. gemma3, llava).",
      "notesInFlow": true
    },
    {
      "parameters": {
        "workflow": "{\n  \"3\": {\n    \"inputs\": {\n      \"seed\": 987948718394761,\n      \"steps\": 20,\n      \"cfg\": 6,\n      \"sampler_name\": \"uni_pc\",\n      \"scheduler\": \"simple\",\n      \"denoise\": 1,\n      \"model\": [\n        \"54\",\n        0\n      ],\n      \"positive\": [\n        \"50\",\n        0\n      ],\n      \"negative\": [\n        \"50\",\n        1\n      ],\n      \"latent_image\": [\n        \"50\",\n        2\n      ]\n    },\n    \"class_type\": \"KSampler\",\n    \"_meta\": {\n      \"title\": \"KSampler\"\n    }\n  },\n  \"6\": {\n    \"inputs\": {\n      \"text\": \"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around\",\n      \"clip\": [\n        \"38\",\n        0\n      ]\n    },\n    \"class_type\": \"CLIPTextEncode\",\n    \"_meta\": {\n      \"title\": \"CLIP Text Encode (Positive Prompt)\"\n    }\n  },\n  \"7\": {\n    \"inputs\": {\n      \"text\": \"色调艳丽，过曝，静态，细节模糊不清，字幕，风格，作品，画作，画面，静止，整体发灰，最差质量，低质量，JPEG压缩残留，丑陋的，残缺的，多余的手指，画得不好的手部，画得不好的脸部，畸形的，毁容的，形态畸形的肢体，手指融合，静止不动的画面，杂乱的背景，三条腿，背景人很多，倒着走\",\n      \"clip\": [\n        \"38\",\n        0\n      ]\n    },\n    \"class_type\": \"CLIPTextEncode\",\n    \"_meta\": {\n      \"title\": \"CLIP Text Encode (Negative Prompt)\"\n    }\n  },\n  \"8\": {\n    \"inputs\": {\n      \"samples\": [\n        \"3\",\n        0\n      ],\n      \"vae\": [\n        \"39\",\n        0\n      ]\n    },\n    \"class_type\": \"VAEDecode\",\n    \"_meta\": {\n      \"title\": \"VAE Decode\"\n    }\n  },\n  \"28\": {\n    \"inputs\": {\n      \"filename_prefix\": \"ComfyUI\",\n      \"fps\": 16,\n      \"lossless\": false,\n      \"quality\": 90,\n      \"method\": \"default\",\n      \"images\": [\n        \"8\",\n        0\n      ]\n    },\n    \"class_type\": \"SaveAnimatedWEBP\",\n    \"_meta\": {\n      \"title\": \"SaveAnimatedWEBP\"\n    }\n  },\n  \"37\": {\n    \"inputs\": {\n      \"unet_name\": \"wan2.1_i2v_480p_14B_fp16.safetensors\",\n      \"weight_dtype\": \"default\"\n    },\n    \"class_type\": \"UNETLoader\",\n    \"_meta\": {\n      \"title\": \"Load Diffusion Model\"\n    }\n  },\n  \"38\": {\n    \"inputs\": {\n      \"clip_name\": \"umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n      \"type\": \"wan\",\n      \"device\": \"default\"\n    },\n    \"class_type\": \"CLIPLoader\",\n    \"_meta\": {\n      \"title\": \"Load CLIP\"\n    }\n  },\n  \"39\": {\n    \"inputs\": {\n      \"vae_name\": \"wan_2.1_vae.safetensors\"\n    },\n    \"class_type\": \"VAELoader\",\n    \"_meta\": {\n      \"title\": \"Load VAE\"\n    }\n  },\n  \"49\": {\n    \"inputs\": {\n      \"clip_name\": \"clip_vision_h.safetensors\"\n    },\n    \"class_type\": \"CLIPVisionLoader\",\n    \"_meta\": {\n      \"title\": \"Load CLIP Vision\"\n    }\n  },\n  \"50\": {\n    \"inputs\": {\n      \"width\": 512,\n      \"height\": 512,\n      \"length\": 33,\n      \"batch_size\": 1,\n      \"positive\": [\n        \"6\",\n        0\n      ],\n      \"negative\": [\n        \"7\",\n        0\n      ],\n      \"vae\": [\n        \"39\",\n        0\n      ],\n      \"clip_vision_output\": [\n        \"51\",\n        0\n      ],\n      \"start_image\": [\n        \"52\",\n        0\n      ]\n    },\n    \"class_type\": \"WanImageToVideo\",\n    \"_meta\": {\n      \"title\": \"WanImageToVideo\"\n    }\n  },\n  \"51\": {\n    \"inputs\": {\n      \"crop\": \"none\",\n      \"clip_vision\": [\n        \"49\",\n        0\n      ],\n      \"image\": [\n        \"52\",\n        0\n      ]\n    },\n    \"class_type\": \"CLIPVisionEncode\",\n    \"_meta\": {\n      \"title\": \"CLIP Vision Encode\"\n    }\n  },\n  \"52\": {\n    \"inputs\": {\n      \"image\": \"flux_dev_example.png\"\n    },\n    \"class_type\": \"LoadImage\",\n    \"_meta\": {\n      \"title\": \"Load Image\"\n    }\n  },\n  \"54\": {\n    \"inputs\": {\n      \"shift\": 8,\n      \"model\": [\n        \"37\",\n        0\n      ]\n    },\n    \"class_type\": \"ModelSamplingSD3\",\n    \"_meta\": {\n      \"title\": \"ModelSamplingSD3\"\n    }\n  }\n}",
        "inputType": "binary"
      },
      "type": "n8n-nodes-comfyui-image-to-video.comfyuiImageToVideo",
      "typeVersion": 1,
      "position": [
        1200,
        -16
      ],
      "id": "dda4ad01-3bcd-499e-a8c1-a40ec4df95c8",
      "name": "ComfyUI Image to Video",
      "notes": "⚙️ SETUP: Credential „ComfyUI“ + Image-to-Video-Workflow (z.B. Wan) in ComfyUI. Community-Node nötig.",
      "notesInFlow": true
    },
    {
      "parameters": {
        "content": "Hier wird das Kühlschrankbild analysiert ",
        "height": 96,
        "width": 208
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -160
      ],
      "typeVersion": 1,
      "id": "524a34b7-d35f-4958-87b7-c5d13ee67a83",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "Aus den erkannten Produkten im K. Wird hier ein Rezept erstellt ",
        "height": 96,
        "width": 192
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -160
      ],
      "typeVersion": 1,
      "id": "8f0d5450-e679-4a67-928d-1c3d891d1fe3",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "Nun wird aus dem rezept ein Bild Prompt ertsellt ",
        "height": 96,
        "width": 192
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -160
      ],
      "typeVersion": 1,
      "id": "6e8a3d18-e7c2-464a-b75d-e302e15fbcb9",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "Hier wird aus dem Prompt ein Bild von dem Rezept erstellt und dann ensteht aus dem Bild ein Video \n",
        "height": 128,
        "width": 192
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -192
      ],
      "typeVersion": 1,
      "id": "1871cb41-53d7-4572-b6a9-8a1c5c5b2752",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "path": "craizy-mealmotion",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -240,
        -16
      ],
      "id": "d710b413-ec01-446e-bb89-35b9c5890110",
      "name": "Webhook",
      "webhookId": "97ef02de-c443-43d1-97a1-86e23a4a70d4"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1648,
        -16
      ],
      "id": "a96654e9-991d-4721-876b-d151448ed7e2",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "content": "## 🔗 crAIzy chAIns – Archiv\n\n# Meal Motion\n\n**Team:** Meal Motion\n**Crazy-Level:** 1 – a little loco\n\n> From fridge snapshot to instant food content: Kühlschrankfoto → Zutaten → Rezept → Food-Bild → Food-Video.\n\nEntstanden im Seminar *crAIzy chAIns* (UdK Berlin, WiSe 2025/26). Gebaut als **agentische Rube-Goldberg-Maschine**: nicht effizient, sondern absichtlich verschlungen. Modelle & Prompts sind Stand 2025/26 – **kein Produktiv-Template, sondern ein Spielzeug**.\n\n### Setup-Checkliste\n- **ComfyUI** – Credential „ComfyUI“ → URL deiner ComfyUI-Instanz (Community-Node nötig)\n- **Upload a file** – Credential „Nextcloud“ anlegen und Ordnerpfad anpassen\n- **Ollama Model** – Credential „Ollama“ → Base-URL deines Ollama (z\n- **Analyze image** – Credential „Ollama“ anlegen\n- **ComfyUI Image to Video** – Credential „ComfyUI“ + Image-to-Video-Workflow (z\n\nAlle Stellen sind im Canvas mit **⚙️ SETUP** markiert. Es sind keine Zugangsdaten enthalten.\n\ncraizy.studio",
        "height": 720,
        "width": 680,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1000,
        -232
      ],
      "id": "51580d96-acf1-4978-b5db-e1d845ac2ed3",
      "name": "README crAIzy chAIns"
    }
  ],
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Analyze image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ComfyUI": {
      "main": [
        [
          {
            "node": "ComfyUI Image to Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload a file": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "ComfyUI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze image": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ComfyUI Image to Video": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": [],
  "active": false
}