{
  "1": {
    "class_type": "UNETLoader",
    "_comment": "Z-Image Turbo BF16 transformer",
    "inputs": {
      "unet_name": "z_image_turbo_bf16.safetensors",
      "weight_dtype": "default"
    }
  },
  "2": {
    "class_type": "CLIPLoader",
    "_comment": "Qwen3-4B text encoder — type 'lumina2' routes to z_image.te() for QWEN3_4B model",
    "inputs": {
      "clip_name": "qwen_3_4b.safetensors",
      "type": "lumina2",
      "device": "default"
    }
  },
  "3": {
    "class_type": "VAELoader",
    "_comment": "Z-Image VAE",
    "inputs": {
      "vae_name": "ae.safetensors"
    }
  },
  "4": {
    "class_type": "ModelSamplingAuraFlow",
    "_comment": "Apply ZImage flowmatch sigma schedule (shift=3.0 matches ZImage sampling_settings)",
    "inputs": {
      "model": [
        "1",
        0
      ],
      "shift": 3.0
    }
  },
  "5": {
    "class_type": "LoraLoader",
    "_comment": "Chaerin character LoRA (rank-16, trained with Prodigy on ZIB)",
    "inputs": {
      "model": [
        "4",
        0
      ],
      "clip": [
        "2",
        0
      ],
      "lora_name": "whisper_zit_lora_v1.safetensors",
      "strength_model": 1.0,
      "strength_clip": 1.0
    }
  },
  "6": {
    "class_type": "TextEncodeZImageOmni",
    "_comment": "Positive conditioning — full-body. Edit prompt per shot.",
    "inputs": {
      "clip": [
        "5",
        1
      ],
      "prompt": "cinematic close-up portrait, face fills 70 percent, widescreen horizontal, 22 year old Korean girl with soft feminine features, slim elegant frame, sharp jawline soft chin, subtle high cheekbones, slim straight nose bridge, natural MLBB pink lips, almond eyes subtle eye makeup, natural pore texture, translucent porcelain skin, aegyo sal, long sleek black hair side-swept over one shoulder, sheer black long sleeve with high neck,, quiet introspective half smile looking off camera,, music video opening scene for song 'Ghost In The Morning' — subject alone in empty apartment at 4am predawn, pale light through window, bedsheets tangled, volumetric light through mist, shot on Fujifilm X-T5 with 56mm f/1.2, highway overpass at dusk with distant car lights bokeh, natural film grain, shallow depth of field, Cinematic widescreen 16:9 landscape orientation.",
      "auto_resize_images": true
    }
  },
  "7": {
    "class_type": "TextEncodeZImageOmni",
    "_comment": "Negative conditioning (empty — ZIT is low-CFG distilled)",
    "inputs": {
      "clip": [
        "5",
        1
      ],
      "prompt": "",
      "auto_resize_images": true
    }
  },
  "8": {
    "class_type": "TextEncodeZImageOmni",
    "_comment": "Face-focused positive for FaceDetailer inpaint pass",
    "inputs": {
      "clip": [
        "5",
        1
      ],
      "prompt": "cinematic close-up portrait, face fills 70 percent, widescreen horizontal, 22 year old Korean girl with soft feminine features, slim elegant frame, sharp jawline soft chin, subtle high cheekbones, slim straight nose bridge, natural MLBB pink lips, almond eyes subtle eye makeup, natural pore texture, translucent porcelain skin, aegyo sal, long sleek black hair side-swept over one shoulder, sheer black long sleeve with high neck,, quiet introspective half smile looking off camera,, music video opening scene for song 'Ghost In The Morning' — subject alone in empty apartment at 4am predawn, pale light through window, bedsheets tangled, volumetric light through mist, shot on Fujifilm X-T5 with 56mm f/1.2, highway overpass at dusk with distant car lights bokeh, natural film grain, shallow depth of field, Cinematic widescreen 16:9 landscape orientation.",
      "auto_resize_images": true
    }
  },
  "9": {
    "class_type": "EmptySD3LatentImage",
    "_comment": "832x1216 portrait — ZIT uses Flux/16ch latent format (Lumina2 base)",
    "inputs": {
      "width": 1408,
      "height": 768,
      "batch_size": 1
    }
  },
  "10": {
    "class_type": "KSampler",
    "_comment": "Full-body generation — ZIT: 20 steps, cfg=4.0, euler/beta",
    "inputs": {
      "model": [
        "5",
        0
      ],
      "positive": [
        "6",
        0
      ],
      "negative": [
        "7",
        0
      ],
      "latent_image": [
        "9",
        0
      ],
      "seed": 1349501979,
      "steps": 8,
      "cfg": 1.0,
      "sampler_name": "euler_ancestral",
      "scheduler": "beta",
      "denoise": 1.0
    }
  },
  "11": {
    "class_type": "VAEDecode",
    "_comment": "Decode full-body latent → image",
    "inputs": {
      "samples": [
        "10",
        0
      ],
      "vae": [
        "3",
        0
      ]
    }
  },
  "12": {
    "class_type": "UltralyticsDetectorProvider",
    "_comment": "YOLOv8m face bbox detector — models/ultralytics/bbox/face_yolov8m.pt",
    "inputs": {
      "model_name": "bbox/face_yolov8m.pt"
    }
  },
  "13": {
    "class_type": "SAMLoader",
    "_comment": "SAM ViT-B for precise face mask segmentation",
    "inputs": {
      "model_name": "sam_vit_b_01ec64.pth",
      "device_mode": "AUTO"
    }
  },
  "14": {
    "class_type": "FaceDetailer",
    "_comment": "Crop face → 512px → inpaint with LoRA (face large = LoRA tokens dominate) → composite back. denoise=0.45 preserves identity, guide_size=512 ensures face tokens dominate transformer.",
    "inputs": {
      "image": [
        "11",
        0
      ],
      "model": [
        "5",
        0
      ],
      "clip": [
        "5",
        1
      ],
      "vae": [
        "3",
        0
      ],
      "guide_size": 512.0,
      "guide_size_for": true,
      "max_size": 1024.0,
      "seed": 42,
      "steps": 8,
      "cfg": 1.0,
      "sampler_name": "euler_ancestral",
      "scheduler": "beta",
      "positive": [
        "8",
        0
      ],
      "negative": [
        "7",
        0
      ],
      "denoise": 0.45,
      "feather": 5,
      "noise_mask": true,
      "force_inpaint": true,
      "bbox_threshold": 0.5,
      "bbox_dilation": 10,
      "bbox_crop_factor": 3.0,
      "sam_detection_hint": "center-1",
      "sam_dilation": 0,
      "sam_threshold": 0.93,
      "sam_bbox_expansion": 0,
      "sam_mask_hint_threshold": 0.7,
      "sam_mask_hint_use_negative": "False",
      "drop_size": 10,
      "bbox_detector": [
        "12",
        0
      ],
      "wildcard": "",
      "cycle": 1,
      "sam_model_opt": [
        "13",
        0
      ]
    }
  },
  "15": {
    "class_type": "SaveImage",
    "_comment": "Save final face-detailed output",
    "inputs": {
      "images": [
        "14",
        0
      ],
      "filename_prefix": "chaerin_fd"
    }
  }
}