{
  "last_node_id": 15,
  "last_link_id": 22,
  "nodes": [
    {
      "id": 1,
      "type": "CheckpointLoaderSimple",
      "pos": [50, 100],
      "size": {"0": 350, "1": 100},
      "flags": {},
      "order": 0,
      "mode": 0,
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [1],
          "slot_index": 0
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [2, 3],
          "slot_index": 1
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": [4],
          "slot_index": 2
        }
      ],
      "properties": {
        "Node name for S&R": "CheckpointLoaderSimple"
      },
      "widgets_values": ["sd_xl_base_1.0.safetensors"],
      "title": "SDXL Base Checkpoint Loader"
    },
    {
      "id": 2,
      "type": "CheckpointLoaderSimple",
      "pos": [50, 300],
      "size": {"0": 350, "1": 100},
      "flags": {},
      "order": 1,
      "mode": 0,
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [11],
          "slot_index": 0
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [12, 13],
          "slot_index": 1
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": [14],
          "slot_index": 2
        }
      ],
      "properties": {
        "Node name for S&R": "CheckpointLoaderSimple"
      },
      "widgets_values": ["sd_xl_refiner_1.0.safetensors"],
      "title": "SDXL Refiner Checkpoint Loader"
    },
    {
      "id": 3,
      "type": "CLIPTextEncode",
      "pos": [450, 100],
      "size": {"0": 400, "1": 200},
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 2
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [5],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": ["A beautiful mountain landscape at sunset, highly detailed, professional photography, cinematic lighting, 8k ultra HD, masterpiece"],
      "title": "API Positive Prompt (Base)"
    },
    {
      "id": 4,
      "type": "CLIPTextEncode",
      "pos": [450, 350],
      "size": {"0": 400, "1": 200},
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 3
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [6],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": ["blurry, low quality, distorted, watermark, text, signature, bad anatomy, deformed"],
      "title": "API Negative Prompt (Base)"
    },
    {
      "id": 5,
      "type": "CLIPTextEncode",
      "pos": [450, 600],
      "size": {"0": 400, "1": 200},
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 12
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [15],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": ["A beautiful mountain landscape at sunset, highly detailed, professional photography, cinematic lighting, 8k ultra HD, masterpiece"],
      "title": "API Positive Prompt (Refiner)"
    },
    {
      "id": 6,
      "type": "CLIPTextEncode",
      "pos": [450, 850],
      "size": {"0": 400, "1": 200},
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 13
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [16],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": ["blurry, low quality, distorted, watermark, text, signature, bad anatomy, deformed"],
      "title": "API Negative Prompt (Refiner)"
    },
    {
      "id": 7,
      "type": "EmptyLatentImage",
      "pos": [900, 600],
      "size": {"0": 315, "1": 106},
      "flags": {},
      "order": 6,
      "mode": 0,
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [7],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [1024, 1024, 1],
      "title": "API Latent Image Config"
    },
    {
      "id": 8,
      "type": "KSampler",
      "pos": [900, 100],
      "size": {"0": 315, "1": 474},
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 1
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 5
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 6
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 7
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [8, 17],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        42,
        "fixed",
        30,
        7.5,
        "dpmpp_2m",
        "karras",
        1
      ],
      "title": "SDXL Base Sampler (30 steps)"
    },
    {
      "id": 9,
      "type": "VAEDecode",
      "pos": [1270, 100],
      "size": {"0": 210, "1": 46},
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 8
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 4
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [9],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "VAEDecode"
      },
      "title": "VAE Decode (Base)"
    },
    {
      "id": 10,
      "type": "PreviewImage",
      "pos": [1530, 100],
      "size": {"0": 400, "1": 400},
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 9
        }
      ],
      "properties": {
        "Node name for S&R": "PreviewImage"
      },
      "title": "Preview Base Output"
    },
    {
      "id": 11,
      "type": "KSampler",
      "pos": [1270, 600],
      "size": {"0": 315, "1": 474},
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 11
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 15
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 16
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 17
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [18],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        42,
        "fixed",
        20,
        7.5,
        "dpmpp_2m",
        "karras",
        1
      ],
      "title": "SDXL Refiner Sampler (20 steps)"
    },
    {
      "id": 12,
      "type": "VAEDecode",
      "pos": [1640, 600],
      "size": {"0": 210, "1": 46},
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 18
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 14
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [19, 20],
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "VAEDecode"
      },
      "title": "VAE Decode (Refiner)"
    },
    {
      "id": 13,
      "type": "PreviewImage",
      "pos": [1900, 600],
      "size": {"0": 400, "1": 400},
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 19
        }
      ],
      "properties": {
        "Node name for S&R": "PreviewImage"
      },
      "title": "Preview Refined Output"
    },
    {
      "id": 14,
      "type": "SaveImage",
      "pos": [1900, 1050],
      "size": {"0": 400, "1": 100},
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 20
        }
      ],
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": ["sdxl_refined_output"],
      "title": "API Image Output"
    }
  ],
  "links": [
    [1, 1, 0, 8, 0, "MODEL"],
    [2, 1, 1, 3, 0, "CLIP"],
    [3, 1, 1, 4, 0, "CLIP"],
    [4, 1, 2, 9, 1, "VAE"],
    [5, 3, 0, 8, 1, "CONDITIONING"],
    [6, 4, 0, 8, 2, "CONDITIONING"],
    [7, 7, 0, 8, 3, "LATENT"],
    [8, 8, 0, 9, 0, "LATENT"],
    [9, 9, 0, 10, 0, "IMAGE"],
    [11, 2, 0, 11, 0, "MODEL"],
    [12, 2, 1, 5, 0, "CLIP"],
    [13, 2, 1, 6, 0, "CLIP"],
    [14, 2, 2, 12, 1, "VAE"],
    [15, 5, 0, 11, 1, "CONDITIONING"],
    [16, 6, 0, 11, 2, "CONDITIONING"],
    [17, 8, 0, 11, 3, "LATENT"],
    [18, 11, 0, 12, 0, "LATENT"],
    [19, 12, 0, 13, 0, "IMAGE"],
    [20, 12, 0, 14, 0, "IMAGE"]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "workflow_info": {
      "name": "SDXL with Refiner Text-to-Image Production",
      "version": "1.0.0",
      "author": "RunPod AI Model Orchestrator",
      "description": "Two-stage text-to-image generation using SDXL Base (30 steps) + Refiner (20 steps). Produces highly detailed, refined outputs with excellent coherence.",
      "category": "text-to-image",
      "tags": ["sdxl", "refiner", "two-stage", "high-quality", "production", "t2i"],
      "requirements": {
        "models": ["stable-diffusion-xl-base-1.0", "stable-diffusion-xl-refiner-1.0"],
        "custom_nodes": [],
        "vram_min": "20GB",
        "vram_recommended": "24GB"
      },
      "parameters": {
        "prompt": {
          "node_id": [3, 5],
          "widget_index": 0,
          "type": "string",
          "required": true,
          "default": "A beautiful mountain landscape at sunset",
          "description": "Text description of desired image (used for both base and refiner)"
        },
        "negative_prompt": {
          "node_id": [4, 6],
          "widget_index": 0,
          "type": "string",
          "required": false,
          "default": "blurry, low quality",
          "description": "Undesired elements to avoid (used for both base and refiner)"
        },
        "width": {
          "node_id": 7,
          "widget_index": 0,
          "type": "integer",
          "required": false,
          "default": 1024,
          "min": 512,
          "max": 2048,
          "description": "Image width in pixels"
        },
        "height": {
          "node_id": 7,
          "widget_index": 1,
          "type": "integer",
          "required": false,
          "default": 1024,
          "min": 512,
          "max": 2048,
          "description": "Image height in pixels"
        },
        "seed": {
          "node_id": [8, 11],
          "widget_index": 0,
          "type": "integer",
          "required": false,
          "default": 42,
          "min": 0,
          "max": 4294967295,
          "description": "Random seed for reproducibility (same for base and refiner)"
        },
        "base_steps": {
          "node_id": 8,
          "widget_index": 2,
          "type": "integer",
          "required": false,
          "default": 30,
          "min": 20,
          "max": 50,
          "description": "Number of sampling steps for base model"
        },
        "refiner_steps": {
          "node_id": 11,
          "widget_index": 2,
          "type": "integer",
          "required": false,
          "default": 20,
          "min": 10,
          "max": 30,
          "description": "Number of sampling steps for refiner model"
        },
        "cfg": {
          "node_id": [8, 11],
          "widget_index": 3,
          "type": "float",
          "required": false,
          "default": 7.5,
          "min": 1.0,
          "max": 15.0,
          "description": "Classifier-free guidance scale (7.5 recommended for SDXL)"
        }
      },
      "outputs": {
        "base_image": {
          "node_id": 10,
          "type": "preview",
          "description": "Base model output (before refinement)"
        },
        "refined_image": {
          "node_id": 14,
          "type": "image",
          "format": "PNG",
          "resolution": "1024x1024 (configurable)",
          "description": "Final refined output"
        }
      },
      "performance": {
        "avg_generation_time": "40-60 seconds (30+20 steps)",
        "vram_usage": "~18-20GB",
        "gpu_utilization": "95-100%",
        "notes": "Base and refiner run sequentially to manage VRAM"
      }
    }
  },
  "version": 0.4
}
