{
  "last_node_id": 15,
  "last_link_id": 10,
  "nodes": [
    {
      "id": 1,
      "type": "Note",
      "pos": [40, 40],
      "size": [360, 225],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Module 02 · Branching & Decision Logic (if / else)",
      "properties": {},
      "widgets_values": [
        "TEAM --UPGRADE · MODULE 02\nPrerequisites: ComfyUI-Easy-Use (for easy ifElse) + core ComfyUI nodes (v0.3+ for PreviewAny).\n\n1. Toggle is_landscape (true = 1920x1080 widescreen / false = 1080x1920 vertical).\n2. Both easy ifElse routers read the same boolean wire so prompt framing and latent canvas dimensions stay synchronized.\n3. Downstream nodes (CLIPTextEncode + PreviewAny) stay unchanged regardless of which branch runs."
      ],
      "color": "#1b3a36",
      "bgcolor": "#132926"
    },
    {
      "id": 2,
      "type": "PrimitiveNode",
      "pos": [40, 320],
      "size": [340, 95],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "BOOLEAN",
          "type": "BOOLEAN",
          "links": [1, 2],
          "slot_index": 0,
          "widget": {
            "name": "boolean"
          }
        }
      ],
      "title": "Condition · is_landscape (true = 16:9, false = 9:16)",
      "properties": {
        "Run widget replace on values": false
      },
      "widgets_values": [
        true
      ]
    },
    {
      "id": 3,
      "type": "PrimitiveNode",
      "pos": [440, 100],
      "size": [360, 105],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [3],
          "slot_index": 0,
          "widget": {
            "name": "on_true"
          }
        }
      ],
      "title": "True Branch · Landscape Prompt (1920x1080)",
      "properties": {
        "Run widget replace on values": false
      },
      "widgets_values": [
        "wide horizontal architectural desk scene, 16:9 widescreen framing, calm daylight"
      ]
    },
    {
      "id": 4,
      "type": "PrimitiveNode",
      "pos": [440, 240],
      "size": [360, 105],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [4],
          "slot_index": 0,
          "widget": {
            "name": "on_false"
          }
        }
      ],
      "title": "False Branch · Vertical Prompt (1080x1920)",
      "properties": {
        "Run widget replace on values": false
      },
      "widgets_values": [
        "tall vertical editorial composition, 9:16 portrait framing, calm daylight"
      ]
    },
    {
      "id": 5,
      "type": "EmptyLatentImage",
      "pos": [440, 410],
      "size": [320, 106],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [5],
          "slot_index": 0
        }
      ],
      "title": "True Branch · Landscape Latent (1920x1080)",
      "properties": {
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        1920,
        1080,
        1
      ]
    },
    {
      "id": 6,
      "type": "EmptyLatentImage",
      "pos": [440, 555],
      "size": [320, 106],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [6],
          "slot_index": 0
        }
      ],
      "title": "False Branch · Vertical Latent (1080x1920)",
      "properties": {
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        1080,
        1920,
        1
      ]
    },
    {
      "id": 7,
      "type": "easy ifElse",
      "pos": [860, 160],
      "size": [260, 110],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "boolean",
          "type": "BOOLEAN",
          "link": 1,
          "widget": {
            "name": "boolean"
          }
        },
        {
          "name": "on_true",
          "type": "*",
          "link": 3
        },
        {
          "name": "on_false",
          "type": "*",
          "link": 4
        }
      ],
      "outputs": [
        {
          "name": "*",
          "type": "*",
          "links": [7, 8],
          "slot_index": 0
        }
      ],
      "title": "If / Else Router · Prompt Branch",
      "properties": {
        "Node name for S&R": "easy ifElse"
      },
      "widgets_values": [
        true
      ]
    },
    {
      "id": 8,
      "type": "easy ifElse",
      "pos": [860, 450],
      "size": [260, 110],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "boolean",
          "type": "BOOLEAN",
          "link": 2,
          "widget": {
            "name": "boolean"
          }
        },
        {
          "name": "on_true",
          "type": "*",
          "link": 5
        },
        {
          "name": "on_false",
          "type": "*",
          "link": 6
        }
      ],
      "outputs": [
        {
          "name": "*",
          "type": "*",
          "links": [9],
          "slot_index": 0
        }
      ],
      "title": "If / Else Router · Latent Dimensions",
      "properties": {
        "Node name for S&R": "easy ifElse"
      },
      "widgets_values": [
        true
      ]
    },
    {
      "id": 9,
      "type": "PreviewAny",
      "pos": [1200, 80],
      "size": [360, 130],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "source",
          "type": "*",
          "link": 7
        }
      ],
      "outputs": [],
      "title": "Preview Routed Prompt (Active Branch)",
      "properties": {
        "Node name for S&R": "PreviewAny"
      },
      "widgets_values": []
    },
    {
      "id": 10,
      "type": "CheckpointLoaderSimple",
      "pos": [860, 310],
      "size": [260, 98],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": null
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [10],
          "slot_index": 1
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": null
        }
      ],
      "title": "Load Checkpoint (Provides CLIP Type)",
      "properties": {
        "Node name for S&R": "CheckpointLoaderSimple"
      },
      "widgets_values": [
        "v1-5-pruned-emaonly.safetensors"
      ]
    },
    {
      "id": 11,
      "type": "CLIPTextEncode",
      "pos": [1200, 250],
      "size": [360, 140],
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 10
        },
        {
          "name": "text",
          "type": "STRING",
          "link": 8,
          "widget": {
            "name": "text"
          }
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [],
          "slot_index": 0
        }
      ],
      "title": "Encode Routed Prompt",
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        ""
      ]
    },
    {
      "id": 12,
      "type": "PreviewAny",
      "pos": [1200, 450],
      "size": [360, 130],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "source",
          "type": "*",
          "link": 9
        }
      ],
      "outputs": [],
      "title": "Preview Routed Latent Shape",
      "properties": {
        "Node name for S&R": "PreviewAny"
      },
      "widgets_values": []
    },
    {
      "id": 13,
      "type": "Note",
      "pos": [40, 440],
      "size": [340, 130],
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Step 01 · Single Boolean Condition",
      "properties": {},
      "widgets_values": [
        "One PrimitiveNode (BOOLEAN) acts as the single source of truth.\nFlip is_landscape between true and false here — never edit downstream prompt or latent nodes by hand."
      ],
      "color": "#2a524c",
      "bgcolor": "#162d2a"
    },
    {
      "id": 14,
      "type": "Note",
      "pos": [440, 680],
      "size": [360, 115],
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Step 02 · Matching Branch Types",
      "properties": {},
      "widgets_values": [
        "Pure-function rule: both on_true and on_false inputs to a router must share the exact same ComfyUI type (both STRING for the prompt router, both LATENT for the canvas router)."
      ],
      "color": "#263144",
      "bgcolor": "#18202c"
    },
    {
      "id": 15,
      "type": "Note",
      "pos": [860, 600],
      "size": [700, 120],
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Step 03 · easy ifElse Routing & Verification",
      "properties": {},
      "widgets_values": [
        "Debugging checklist:\n- Missing easy ifElse node? Install ComfyUI-Easy-Use via ComfyUI Manager and restart.\n- Confirm boolean wire connects to both routers.\n- Inspect PreviewAny nodes after toggling is_landscape to verify prompt text and latent dimensions match."
      ],
      "color": "#3a324d",
      "bgcolor": "#231e2f"
    }
  ],
  "links": [
    [1, 2, 0, 7, 0, "BOOLEAN"],
    [2, 2, 0, 8, 0, "BOOLEAN"],
    [3, 3, 0, 7, 1, "STRING"],
    [4, 4, 0, 7, 2, "STRING"],
    [5, 5, 0, 8, 1, "LATENT"],
    [6, 6, 0, 8, 2, "LATENT"],
    [7, 7, 0, 9, 0, "STRING"],
    [8, 7, 0, 11, 1, "STRING"],
    [9, 8, 0, 12, 0, "LATENT"],
    [10, 10, 1, 11, 0, "CLIP"]
  ],
  "groups": [
    {
      "id": 1,
      "title": "01 · Single Boolean Condition",
      "bounding": [20, 280, 380, 310],
      "color": "#2a524c",
      "font_size": 20,
      "flags": {}
    },
    {
      "id": 2,
      "title": "02 · Parallel Format Branches (1920x1080 vs 1080x1920)",
      "bounding": [420, 40, 400, 770],
      "color": "#263144",
      "font_size": 20,
      "flags": {}
    },
    {
      "id": 3,
      "title": "03 · If / Else Routing & Output Verification",
      "bounding": [840, 40, 740, 700],
      "color": "#3a324d",
      "font_size": 20,
      "flags": {}
    }
  ],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.85,
      "offset": [0, 0]
    },
    "team_upgrade_module": "02_if_else_branching"
  },
  "version": 0.4
}
