{
  "config": {},
  "extra": {
    "ds": {
      "offset": [
        1420.97070785739,
        750.5187781239184
      ],
      "scale": 0.72225
    },
    "frontendVersion": "1.46.7"
  },
  "groups": [
    {
      "bounding": [
        -520,
        -110,
        910,
        630
      ],
      "color": "#3f789e",
      "flags": {},
      "id": 1,
      "title": "JSON Prompt Builder (Select and Ctrl-B to enable)"
    }
  ],
  "id": "68b68bc1-9f30-4ad2-9d27-8a1e28132c60",
  "last_link_id": 9,
  "last_node_id": 14,
  "links": [
    [
      3,
      7,
      0,
      6,
      0,
      "IMAGE"
    ],
    [
      9,
      11,
      0,
      14,
      0,
      "STRING"
    ]
  ],
  "nodes": [
    {
      "flags": {},
      "id": 6,
      "inputs": [
        {
          "link": 3,
          "localized_name": "images",
          "name": "images",
          "type": "IMAGE"
        },
        {
          "link": null,
          "localized_name": "filename_prefix",
          "name": "filename_prefix",
          "type": "STRING",
          "widget": {
            "name": "filename_prefix"
          }
        }
      ],
      "mode": 0,
      "order": 3,
      "outputs": [],
      "pos": [
        -50,
        -480
      ],
      "properties": {},
      "size": [
        420,
        320
      ],
      "type": "SaveImage",
      "widgets_values": [
        "ideogram_v4"
      ]
    },
    {
      "bgcolor": "#653",
      "color": "#432",
      "flags": {},
      "id": 7,
      "inputs": [
        {
          "link": null,
          "localized_name": "prompt",
          "name": "prompt",
          "type": "STRING",
          "widget": {
            "name": "prompt"
          }
        },
        {
          "link": null,
          "localized_name": "resolution",
          "name": "resolution",
          "type": "COMBO",
          "widget": {
            "name": "resolution"
          }
        },
        {
          "link": null,
          "localized_name": "rendering_speed",
          "name": "rendering_speed",
          "type": "COMBO",
          "widget": {
            "name": "rendering_speed"
          }
        },
        {
          "link": null,
          "localized_name": "seed",
          "name": "seed",
          "type": "INT",
          "widget": {
            "name": "seed"
          }
        }
      ],
      "mode": 0,
      "order": 0,
      "outputs": [
        {
          "links": [
            3
          ],
          "localized_name": "IMAGE",
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        -520,
        -480
      ],
      "properties": {
        "Node name for S&R": "IdeogramV4"
      },
      "size": [
        440,
        320
      ],
      "title": "IdeogramV4 — JSON prompt",
      "type": "IdeogramV4",
      "widgets_values": [
        "{\n  \"high_level_description\": \"A surreal, retro-futuristic vintage collage poster featuring a vintage orange train carriage suspended within a fluffy white cloud in a grainy blue sky. An astronaut sits casually on the edge of the floating train with a wooden ladder dangling to the rolling green meadows below, surrounded by nostalgic, distressed typographic elements evoking a cozy atmosphere.\",\n  \"style_description\": {\n    \"aesthetics\": \"surreal vintage collage poster, heavy nostalgic film grain, distressed textures, retro-futuristic montage, whimsical and cozy\",\n    \"lighting\": \"soft, dreamy ambient lighting with a flat, printed-poster illumination and faded shadows\",\n    \"photo\": \"vintage film scan, heavy analog film grain, halftone print artifacts\",\n    \"medium\": \"mixed media collage illustration, vintage poster design\",\n    \"color_palette\": [\n      \"#4A6B8A\",\n      \"#D96C33\",\n      \"#F0EAD6\",\n      \"#4C7348\",\n      \"#2B2522\"\n    ]\n  },\n  \"compositional_deconstruction\": {\n    \"background\": \"A vintage grainy blue sky that fades toward the horizon, transitioning into distant majestic rocky mountain peaks. Below the mountains, the bottom third of the frame is filled with a lush, rolling green meadow dotted with tiny, colorful wildflowers.\",\n    \"elements\": [\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          750,\n          100,\n          850,\n          200\n        ],\n        \"desc\": \"A subtle crescent moon glowing gently in the upper right sky, featuring a faded, distressed vintage paper texture.\",\n        \"color_palette\": [\n          \"#E8E3D5\",\n          \"#C4BFB3\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          30,\n          30,\n          150,\n          80\n        ],\n        \"desc\": \"Small vintage typography reading 'STAY' positioned in the top left corner, styled in a distressed and faded white font.\",\n        \"color_palette\": [\n          \"#F4F1E1\",\n          \"#E6E2D6\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          850,\n          30,\n          970,\n          80\n        ],\n        \"desc\": \"Small vintage typography reading 'COZY' positioned in the top right corner, matching the distressed and faded aesthetic of the other text.\",\n        \"color_palette\": [\n          \"#F4F1E1\",\n          \"#E6E2D6\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          250,\n          200,\n          850,\n          400\n        ],\n        \"desc\": \"Large, bold, distressed white retro typography spelling 'COMFY', integrated directly into the background sky directly behind the train and cloud.\",\n        \"color_palette\": [\n          \"#FFFFFF\",\n          \"#F4F1E1\",\n          \"#E6E2D6\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          150,\n          200,\n          320,\n          300\n        ],\n        \"desc\": \"Smaller white distressed text reading 'RELAX IN THIS', placed on an angle in the mid-left sky area just to the left of the main 'COMFY' text.\",\n        \"color_palette\": [\n          \"#F4F1E1\",\n          \"#D8D4C7\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          250,\n          350,\n          750,\n          600\n        ],\n        \"desc\": \"A large, fluffy white cloud floating centrally in the sky. It has soft, rounded edges and a vintage halftone texture, acting as a magical nest for the train.\",\n        \"color_palette\": [\n          \"#FFFFFF\",\n          \"#F0EAD6\",\n          \"#D4CFCA\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          300,\n          380,\n          700,\n          520\n        ],\n        \"desc\": \"A vintage orange train carriage magically nestled inside the cloud, featuring retro metal siding, small windows, and heavily weathered paint.\",\n        \"color_palette\": [\n          \"#D96C33\",\n          \"#B54E1D\",\n          \"#7A4B3A\",\n          \"#F4F1E1\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          450,\n          460,\n          550,\n          580\n        ],\n        \"desc\": \"An astronaut wearing a retro orange spacesuit and helmet, sitting casually and comfortably with legs dangling off the bottom edge of the floating train.\",\n        \"color_palette\": [\n          \"#D96C33\",\n          \"#F0EAD6\",\n          \"#3A4550\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          480,\n          520,\n          520,\n          900\n        ],\n        \"desc\": \"A long, rustic wooden ladder dangling straight down from the open doorway of the train carriage towards the grassy meadow below.\",\n        \"color_palette\": [\n          \"#7A4B3A\",\n          \"#5C3A21\",\n          \"#3B2615\"\n        ]\n      },\n      {\n        \"type\": \"obj\",\n        \"bbox\": [\n          100,\n          880,\n          900,\n          970\n        ],\n        \"desc\": \"A long quote written in a small vintage serif font, overlaid across the grassy hill at the bottom: 'Sometimes just slowing down is exactly what you need. The right environment and comfort should be used to find true peace. Just rushing blindly is never enough. Take a deep breath and relax.'\",\n        \"color_palette\": [\n          \"#F4F1E1\",\n          \"#E6E2D6\"\n        ]\n      }\n    ]\n  }\n}",
        "Auto",
        "DEFAULT",
        0,
        "randomize"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 8,
      "inputs": [],
      "mode": 0,
      "order": 1,
      "outputs": [],
      "pos": [
        -970,
        -480
      ],
      "properties": {},
      "size": [
        410,
        736.75
      ],
      "title": "Note: Ideogram 4 (API)",
      "type": "MarkdownNote",
      "widgets_values": [
        "## What this workflow does\n\n**Generate path (connected):**\n\n`IdeogramV4` → `Save Image`\n\n1. **IdeogramV4**: partner API node. You can type **plain natural language** in the prompt field, but this workflow uses **structured JSON** for stronger control (layout, colors, in-image text, per-object `bbox`). There is no separate negative prompt field.\n2. **Save Image**:writes output with filename prefix `ideogram_v4`.\n\n**JSON Prompt Builder (Gemini):**\n\nUse **Gemini** (`gemini-3-1-pro`) to help build the **IdeogramV4** prompt: describe your idea in the user prompt field; the model returns schema-matching JSON. Connect **STRING** → **IdeogramV4** `prompt` if you want it wired in, or paste / type the result manually. This workflow leaves that link open so the bundled JSON example stays in **IdeogramV4** by default.\n\n---\n\n## Prompt format\n\n- **Natural language** — allowed; quickest for simple ideas.\n- **JSON** (as in this file) — better control over style palette, element placement (`bbox`), and literal text in the image; recommended for posters like the default example."
      ]
    },
    {
      "flags": {},
      "id": 14,
      "inputs": [
        {
          "link": 9,
          "localized_name": "source",
          "name": "source",
          "type": "*"
        }
      ],
      "mode": 4,
      "order": 4,
      "outputs": [
        {
          "links": null,
          "localized_name": "STRING",
          "name": "STRING",
          "type": "STRING"
        }
      ],
      "pos": [
        -40,
        -20
      ],
      "properties": {
        "Node name for S&R": "PreviewAny"
      },
      "size": [
        400,
        480
      ],
      "type": "PreviewAny",
      "widgets_values": [
        null,
        null,
        null
      ]
    },
    {
      "bgcolor": "#653",
      "color": "#432",
      "flags": {},
      "id": 11,
      "inputs": [
        {
          "link": null,
          "localized_name": "images",
          "name": "images",
          "shape": 7,
          "type": "IMAGE"
        },
        {
          "link": null,
          "localized_name": "audio",
          "name": "audio",
          "shape": 7,
          "type": "AUDIO"
        },
        {
          "link": null,
          "localized_name": "video",
          "name": "video",
          "shape": 7,
          "type": "VIDEO"
        },
        {
          "link": null,
          "localized_name": "files",
          "name": "files",
          "shape": 7,
          "type": "GEMINI_INPUT_FILES"
        },
        {
          "link": null,
          "localized_name": "prompt",
          "name": "prompt",
          "type": "STRING",
          "widget": {
            "name": "prompt"
          }
        },
        {
          "link": null,
          "localized_name": "model",
          "name": "model",
          "type": "COMBO",
          "widget": {
            "name": "model"
          }
        },
        {
          "link": null,
          "localized_name": "seed",
          "name": "seed",
          "type": "INT",
          "widget": {
            "name": "seed"
          }
        },
        {
          "link": null,
          "localized_name": "system_prompt",
          "name": "system_prompt",
          "shape": 7,
          "type": "STRING",
          "widget": {
            "name": "system_prompt"
          }
        }
      ],
      "mode": 4,
      "order": 2,
      "outputs": [
        {
          "links": [
            9
          ],
          "localized_name": "STRING",
          "name": "STRING",
          "type": "STRING"
        }
      ],
      "pos": [
        -510,
        -20
      ],
      "properties": {
        "Node name for S&R": "GeminiNode",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.23.0"
      },
      "size": [
        440,
        490
      ],
      "type": "GeminiNode",
      "widgets_values": [
        "",
        "gemini-3-1-pro",
        845883334557777,
        "randomize",
        "You are a scene composition assistant. Given a user request for an image, you output a single JSON document that describes the scene in a structured, render-ready form. You output JSON only — no prose, no markdown fences, no commentary.\n\n# Output format\n\nYour response MUST be a single valid JSON object matching exactly this shape and key set:\n\n```\n{\n  \"high_level_description\": \"\",\n  \"style_description\": {\n    \"aesthetics\": \"\",\n    \"lighting\": \"\",\n    \"photo\": \"\",\n    \"medium\": \"\",\n    \"color_palette\": []\n  },\n  \"compositional_deconstruction\": {\n    \"background\": \"\",\n    \"elements\": [\n      {\n        \"type\": \"obj\",\n        \"bbox\": [0, 0, 0, 0],\n        \"desc\": \"\",\n        \"color_palette\": []\n      }\n    ]\n  }\n}\n```\n\nAll keys above are required and must appear exactly as named. Do not add, rename, or remove any keys.\n\n# Field rules\n\n## high_level_description\n\n- String. One sentence or short paragraph summarizing the whole image: setting, time of day, main subjects, and overall mood.\n\n## style_description\n\nA flat object describing how the image is rendered, independent of what it depicts.\n\n- `aesthetics` (string): Overall visual style and treatment (e.g. \"clean product photography, sharp focus, shallow depth of field\", \"moody cinematic\", \"flat vector illustration\").\n- `lighting` (string): Light source, direction, quality, and color temperature (e.g. \"soft natural window light\", \"harsh midday sun from the left\", \"warm tungsten key with cool rim\").\n- `photo` (string): Camera/lens/photographic specifics when relevant (e.g. \"DSLR macro photograph\", \"35mm film, slight grain\", \"200mm telephoto, f/2.8\"). Use an empty string `\"\"` if the medium is not photographic.\n- `medium` (string): The medium category (e.g. \"photography\", \"oil painting\", \"3D render\", \"watercolor\", \"digital illustration\").\n- `color_palette` (array of strings): 3–6 dominant colors of the overall image as uppercase hex codes in `#RRGGBB` form (e.g. `[\"#B0301F\", \"#7A4B2A\", \"#E8D9C0\"]`).\n\n## compositional_deconstruction.background\n\n- String. Describe only the environment behind and around the subjects: setting, surface, atmosphere, depth cues. Do NOT describe any element listed in `elements`.\n\n## compositional_deconstruction.elements\n\nArray with at least 1 item, listed roughly background-to-foreground.\n\nEach element:\n\n- `type` (string): Always `\"obj\"`.\n- `bbox` (array of 4 integers): `[x_min, y_min, x_max, y_max]` on a 1000×1000 canvas with origin at the top-left, x increasing rightward, y increasing downward. Must satisfy `0 ≤ x_min < x_max ≤ 1000` and `0 ≤ y_min < y_max ≤ 1000`. The box must reflect the element's described position and relative size.\n- `desc` (string): Identity, pose and orientation, location in the frame, relative size, key visual details (textures, markings), gaze or motion, and any atmosphere/light interaction specific to this element. Do not restate global background or style information.\n- `color_palette` (array of strings): 2–5 dominant colors of THIS element as uppercase hex codes in `#RRGGBB` form.\n\n# Composition guidance\n\n- Place elements deliberately: vary depth, avoid centering everything, and let bboxes match the prose (\"midground left\" should not have `x_min` near 800).\n- Keep `style_description` and every `desc` mutually consistent in palette, lighting, and atmosphere.\n- Each element's `color_palette` should be plausibly drawn from or harmonious with the overall `style_description.color_palette`.\n- Prefer 3–8 elements unless the user explicitly asks for more or fewer.\n\n# Hard constraints\n\n- Output valid JSON and nothing else.\n- Use only the keys defined above, exactly as spelled. No extra fields.\n- Do not wrap the JSON in code fences or add explanations.\n\n# Instruction\n\nGenerate the JSON based on this user prompt: "
      ]
    }
  ],
  "revision": 0,
  "version": 0.4
}