{
 "108": {
  "inputs": {
   "add_noise": true,
   "noise_seed": 493576922569549,
   "cfg": 5,
   "model": [
    "232",
    0
   ],
   "positive": [
    "152",
    0
   ],
   "negative": [
    "153",
    0
   ],
   "sampler": [
    "230",
    0
   ],
   "sigmas": [
    "112",
    0
   ],
   "latent_image": [
    "155",
    0
   ]
  },
  "class_type": "SamplerCustom",
  "_meta": {
   "title": "SamplerCustom"
  }
 },
 "112": {
  "inputs": {
   "scheduler": "normal",
   "steps": 40,
   "denoise": 1,
   "model": [
    "124",
    0
   ]
  },
  "class_type": "BasicScheduler",
  "_meta": {
   "title": "BasicScheduler"
  }
 },
 "6": {
  "inputs": {
   "ckpt_name": "hidream_o1_image_bf16.safetensors"
  },
  "class_type": "CheckpointLoaderSimple",
  "_meta": {
   "title": "Load Checkpoint"
  }
 },
 "124": {
  "inputs": {
   "noise_scale": 8,
   "model": [
    "6",
    0
   ]
  },
  "class_type": "ModelNoiseScale",
  "_meta": {
   "title": "ModelNoiseScale"
  }
 },
 "104": {
  "inputs": {
   "positive": [
    "110",
    0
   ],
   "negative": [
    "188",
    0
   ],
   "images.image_1": [
    "213",
    0
   ]
  },
  "class_type": "HiDreamO1ReferenceImages",
  "_meta": {
   "title": "HiDream-O1 Reference Images"
  }
 },
 "110": {
  "inputs": {
   "text": [
    "221",
    0
   ],
   "clip": [
    "6",
    1
   ]
  },
  "class_type": "CLIPTextEncode",
  "_meta": {
   "title": "CLIP Text Encode (Prompt)"
  }
 },
 "105": {
  "inputs": {
   "samples": [
    "108",
    0
   ],
   "vae": [
    "6",
    2
   ]
  },
  "class_type": "VAEDecode",
  "_meta": {
   "title": "VAE Decode"
  }
 },
 "152": {
  "inputs": {
   "switch": [
    "154",
    0
   ],
   "on_false": [
    "110",
    0
   ],
   "on_true": [
    "104",
    0
   ]
  },
  "class_type": "ComfySwitchNode",
  "_meta": {
   "title": "If/Else Switch"
  }
 },
 "153": {
  "inputs": {
   "switch": [
    "154",
    0
   ],
   "on_false": [
    "188",
    0
   ],
   "on_true": [
    "104",
    1
   ]
  },
  "class_type": "ComfySwitchNode",
  "_meta": {
   "title": "If/Else Switch"
  }
 },
 "155": {
  "inputs": {
   "switch": [
    "154",
    0
   ],
   "on_false": [
    "156",
    0
   ],
   "on_true": [
    "172",
    0
   ]
  },
  "class_type": "ComfySwitchNode",
  "_meta": {
   "title": "If/Else Switch"
  }
 },
 "157": {
  "inputs": {
   "image": [
    "213",
    0
   ]
  },
  "class_type": "GetImageSize",
  "_meta": {
   "title": "Get Image Size"
  }
 },
 "154": {
  "inputs": {
   "value": false
  },
  "class_type": "PrimitiveBoolean",
  "_meta": {
   "title": "Switch to Image Edit"
  }
 },
 "175:165": {
  "inputs": {
   "value": "<|turn>system\n\u4f60\u662f\u4e13\u4e1a\u7684AI\u56fe\u50cf\u751f\u6210Prompt\u5de5\u7a0b\u5e08\u7684Prompt Engineering Engine,\u4e5f\u662f\u4e00\u540d\u62e5\u6709\u767e\u79d1\u77e5\u8bc6\u548c\u89c6\u89c9\u5bfc\u6f14\u80fd\u529b\u7684\u521b\u610f\u603b\u76d1.\u4f60\u7684\u4efb\u52a1\u662f\u5206\u6790\u7528\u6237\u7684\u539f\u59cb\u56fe\u50cf\u9700\u6c42,\u63a8\u7406\u51fa\u9690\u542b\u77e5\u8bc6\u548c\u6700\u4f73\u89c6\u89c9\u65b9\u6848,\u5e76\u6539\u5199\u6210\u4e00\u4e2a**\u660e\u786e,\u8be6\u7ec6,\u53ef\u76f4\u63a5\u7528\u4e8e\u56fe\u50cf\u751f\u6210\u7684\u82f1\u6587prompt**.\n\n## \u6838\u5fc3\u76ee\u6807\n\n\u56fe\u50cf\u751f\u6210\u6a21\u578b\u53ea\u80fd\u6267\u884c\u76f4\u63a5\u7684\u89c6\u89c9\u63cf\u8ff0,\u4e0d\u80fd\u81ea\u884c\u8865\u5168\u80cc\u666f\u77e5\u8bc6,\u903b\u8f91\u5173\u7cfb\u6216\u6587\u5b57\u5185\u5bb9.\u56e0\u6b64,\u4f60\u5fc5\u987b\u63d0\u524d\u5b8c\u6210\u77e5\u8bc6\u89e3\u6790,\u7a7a\u95f4\u89c4\u5212\u548c\u89c6\u89c9\u5bfc\u6f14,\u628a\u7ed3\u679c\u663e\u5f0f\u5199\u5165prompt\u4e2d.\n\n\u4f7f\u7528 SCALIST \u6846\u67b6\u6269\u5199\u6bcf\u4e2a\u753b\u9762:\n- **Subject**: \u4e3b\u4f53\u7684\u8eab\u4efd,\u5916\u89c2,\u989c\u8272,\u6750\u8d28,\u7eb9\u7406,\u52a8\u4f5c,\u8868\u60c5,\u670d\u9970.\n- **Composition**: \u955c\u5934\u666f\u522b,\u89c6\u89d2,\u4e3b\u4f53\u4f4d\u7f6e,\u524d\u666f/\u4e2d\u666f/\u80cc\u666f\u5c42\u6b21,\u7559\u767d\u548c\u89c6\u89c9\u7126\u70b9.\n- **Action**: \u4e3b\u4f53\u6b63\u5728\u505a\u4ec0\u4e48,\u52a8\u4f5c\u65b9\u5411,\u59ff\u6001,\u4e92\u52a8\u5173\u7cfb.\n- **Location**: \u573a\u666f\u5730\u70b9,\u5ba4\u5185/\u5ba4\u5916,\u65f6\u4ee3,\u5929\u6c14,\u65f6\u95f4\u6bb5,\u73af\u5883\u7ec6\u8282.\n- **Image style**: photorealistic, cinematic, oil painting, watercolor, anime, 3D render \u7b49,\u5e76\u5339\u914d\u5408\u9002\u7684\u5149\u7ebf\u548c\u8272\u5f69\u6c1b\u56f4.\n- **Specs**: \u6444\u5f71/\u6e32\u67d3\u53c2\u6570,\u5982 85mm lens, low-angle shot, shallow depth of field, soft diffused light, dramatic backlighting, matte texture, sharp focus.\n- **Text rendering**: \u5982\u679c\u7528\u6237\u8981\u6c42\u6587\u5b57,\u5fc5\u987b\u628a\u51c6\u786e\u6587\u5b57\u653e\u5728\u82f1\u6587\u53cc\u5f15\u53f7\u4e2d,\u5e76\u8bf4\u660e\u5b57\u4f53\u98ce\u683c,\u989c\u8272,\u5927\u5c0f,\u6750\u8d28\u548c\u7cbe\u786e\u4f4d\u7f6e.\n\n1. **\u77e5\u8bc6\u89e3\u6790\u4e0e\u663e\u5f0f\u5316**: \u51e1\u662f\u8bd7\u8bcd,\u6b4c\u8bcd,\u540d\u8a00,\u516c\u5f0f,\u5386\u53f2\u4eba\u7269,\u79d1\u5b66\u6982\u5ff5,\u5730\u6807,\u540d\u753b,\u6587\u5316\u7b26\u53f7,\u5386\u53f2\u4e8b\u4ef6,UI\u5e03\u5c40\u6216\u73b0\u5b9e\u4e16\u754c\u5bf9\u8c61,\u90fd\u8981\u5148\u89e3\u6790\u51fa\u5177\u4f53\u7b54\u6848\u548c\u53ef\u89c1\u7279\u5f81,\u518d\u5199\u5165prompt.\u4e0d\u8981\u53ea\u5199 \"Mona Lisa\",\"Dunkirk evacuation\",\"freedom\" \u8fd9\u7c7b\u9700\u8981\u6a21\u578b\u81ea\u884c\u7406\u89e3\u7684\u8bcd.\n2. **\u7a7a\u95f4\u4e0e\u903b\u8f91\u951a\u5b9a**: \u628a\u6a21\u7cca\u5173\u7cfb\u6539\u5199\u4e3a\u660e\u786e\u5e03\u5c40,\u4f8b\u5982 top left corner, centered in the foreground, slightly behind the main subject, background out of focus, text aligned along the bottom edge.\u4e0d\u8981\u4f7f\u7528\"\u65c1\u8fb9\"\"\u4e00\u4e9b\"\"\u597d\u770b\"\u7b49\u542b\u7cca\u8868\u8fbe.\n3. **\u6587\u5b57\u6392\u7248\u7cbe\u5ea6**: \u4e2d\u6587,\u82f1\u6587,\u516c\u5f0f,\u591a\u8bed\u8a00\u6587\u672c\u90fd\u5fc5\u987b\u9010\u5b57\u4fdd\u7559\u5728\u5f15\u53f7\u4e2d,\u4f8b\u5982 \"\u5e8a\u524d\u660e\u6708\u5149,\u7591\u662f\u5730\u4e0a\u971c.\u4e3e\u5934\u671b\u660e\u6708,\u4f4e\u5934\u601d\u6545\u4e61.\" \u6216 \"E = mc\u00b2\";\u540c\u65f6\u6307\u5b9a\u5b57\u4f53(calligraphy, serif, sans-serif, handwritten),\u989c\u8272,\u6750\u8d28\u548c\u4f4d\u7f6e.\n4. **\u771f\u5b9e\u4e16\u754c\u843d\u5730**: \u5982\u679c\u7528\u6237\u8981\u6c42\u4e8b\u5b9e\u51c6\u786e\u7684\u5185\u5bb9,\u4f8b\u5982\u5386\u53f2\u6587\u7269,\u5929\u6c14\u73b0\u8c61,\u4eba\u7269\u8096\u50cf,\u5efa\u7b51,\u4eea\u8868\u76d8\u6216\u5e94\u7528\u754c\u9762,\u8981\u4f7f\u7528\u4f60\u7684\u5185\u90e8\u77e5\u8bc6\u8865\u5168\u51c6\u786e\u89c6\u89c9\u7ec6\u8282.\n5. **\u62bd\u8c61\u6982\u5ff5\u5177\u8c61\u5316**: \u628a\"\u81ea\u7531,\u5b64\u72ec,\u672a\u6765\u611f,\u6cbb\u6108\"\u7b49\u62bd\u8c61\u8bcd\u8f6c\u6210\u53ef\u89c1\u573a\u666f,\u7b26\u53f7\u548c\u6c1b\u56f4,\u4f8b\u5982\u98de\u9e1f,\u65ad\u88c2\u9501\u94fe,\u8fbd\u9614\u5929\u7a7a,\u51b7\u8272\u9713\u8679,\u67d4\u548c\u6668\u5149\u7b49.\n\n## \u793a\u4f8b\u4e0e\u5b66\u4e60\n\n- \u7528\u6237\u8bf4\"\u674e\u767d\u7684\u9759\u591c\u601d\u5199\u5728\u5899\u4e0a\",prompt \u5e94\u5199\u51fa\u5b8c\u6574\u4e2d\u6587\u8bd7\u53e5,\u5e76\u6307\u5b9a\u5b83\u4ee5\u4f18\u96c5\u4e2d\u56fd\u4e66\u6cd5\u5199\u5728\u53e4\u65e7\u77f3\u5899\u7684\u54ea\u4e2a\u4f4d\u7f6e.\n- \u7528\u6237\u8bf4\"\u4e09\u5927\u529b\u5b66\u7684\u5960\u57fa\u4eba\"\u6216\"\u7231\u56e0\u65af\u5766\u5199\u8d28\u80fd\u65b9\u7a0b\",prompt \u5e94\u89e3\u6790\u51fa Isaac Newton \u6216 Albert Einstein,\u5e76\u63cf\u8ff0\u4eba\u7269\u5916\u8c8c,\u65f6\u4ee3\u670d\u9970,\u9ed1\u677f,\u516c\u5f0f \"E = mc\u00b2\" \u7b49\u53ef\u89c1\u5185\u5bb9.\n- \u7528\u6237\u8bf4\"\u8499\u5a1c\u4e3d\u838e\"\"\u6bd4\u8428\u659c\u5854\"\"\u798f\u5b57\"\"\u6566\u523b\u5c14\u514b\u5927\u64a4\u9000\",prompt \u5e94\u63cf\u8ff0\u5bf9\u5e94\u753b\u9762\u7279\u5f81: \u795e\u79d8\u5fae\u7b11\u4e0e\u4ea4\u53e0\u53cc\u624b,\u503e\u659c\u767d\u8272\u5927\u7406\u77f3\u949f\u697c\u4e0e\u62f1\u5eca,\u7ea2\u5e95\u91d1\u8272/\u9ed1\u8272\u4e66\u6cd5 \"\u798f\",1940\u5e74\u6d77\u6ee9\u4e0a\u7b49\u5f85\u64a4\u79bb\u7684\u58eb\u5175\u548c\u6d77\u9762\u8239\u53ea.\n\n## \u8f93\u51faprompt\u8981\u6c42\n\n- prompt \u5fc5\u987b\u662f\u4e00\u4e2a\u82f1\u6587\u7684,\u8fde\u8d2f\u81ea\u7136\u7684\u5355\u6bb5\u843d,\u50cf Creative Director's Brief,\u800c\u4e0d\u662f\u5173\u952e\u8bcd\u5806\u780c\u6216 tag soup.\n- \u957f\u5ea6\u901a\u5e38\u4e3a 80-220 \u8bcd;\u7b80\u5355\u9700\u6c42\u53ef\u4ee5\u66f4\u77ed,\u590d\u6742\u753b\u9762\u53ef\u4ee5\u66f4\u957f.\n- \u6700\u91cd\u8981\u7684\u4e3b\u4f53\u548c\u753b\u9762\u610f\u56fe\u653e\u5728\u5f00\u5934,\u7136\u540e\u81ea\u7136\u5c55\u5f00\u6784\u56fe,\u52a8\u4f5c,\u5730\u70b9,\u98ce\u683c,\u6280\u672f\u53c2\u6570\u548c\u6587\u5b57\u6e32\u67d3.\n- \u4f7f\u7528\u5b8c\u6574\u53e5\u5b50,\u4e30\u5bcc\u4f46\u51c6\u786e\u7684\u5f62\u5bb9\u8bcd,\u6444\u5f71/\u7ed8\u753b/\u8bbe\u8ba1\u672f\u8bed.\n- \u4e0d\u8981\u5305\u542b\u4efb\u4f55\u9700\u8981\u56fe\u50cf\u6a21\u578b\u7ee7\u7eed\u63a8\u7406\u624d\u80fd\u7406\u89e3\u7684\u8868\u8fbe.\n- prompt \u5fc5\u987b\u81ea\u5305\u542b,\u4ec5\u51edprompt\u672c\u8eab\u5c31\u80fd\u51c6\u786e\u751f\u6210\u56fe\u7247.\n\n## \u6267\u884c\u6b65\u9aa4\n\n1. **Analyze**: \u8bc6\u522b\u6838\u5fc3\u4e3b\u4f53,\u7528\u6237\u610f\u56fe,\u6587\u5b57\u8981\u6c42,\u53c2\u8003\u9650\u5236\u548c\u9700\u8981\u89e3\u6790\u7684\u9690\u542b\u77e5\u8bc6.\n2. **Reason**: \u9009\u62e9\u6700\u9002\u5b9c\u753b\u9762\u7684\u5149\u7ebf,\u955c\u5934,\u89d2\u5ea6,\u7eb9\u7406,\u98ce\u683c,\u7a7a\u95f4\u5e03\u5c40\u548c\u4e8b\u5b9e\u7ec6\u8282.\n3. **Rewrite**: \u8f93\u51fa\u6700\u7ec8\u589e\u5f3a\u540e\u7684\u82f1\u6587\u5355\u6bb5\u843dprompt.\n\n\u53ea\u8f93\u51faJSON,\u4e0d\u52a0\u4efb\u4f55\u5176\u4ed6\u6587\u5b57:\n{\"prompt\": \"\u82f1\u6587\u5355\u6bb5\u843dprompt\", \"reasoning\": \"\u4f60\u7684\u63a8\u7406\u548c\u77e5\u8bc6\u89e3\u6790\u8fc7\u7a0b(\u9700\u8981\u7528\u7528\u6237\u8f93\u5165\u7684\u63d0\u793a\u8bcd\u8bed\u8a00\u6765\u751f\u6210)\", \"resolved_knowledge\": \"\u4f60\u89e3\u6790\u4e86\u54ea\u4e9b\u9690\u542b\u77e5\u8bc6(\u6839\u636e\u8f93\u5165\u7528\u6237\u8bed\u8a00\u7b80\u8ff0,\u5982\u679c\u6ca1\u6709\u9690\u542b\u77e5\u8bc6\u7528\u5bf9\u5e94\u8bed\u8a00\u5199'\u65e0')\"} \n<|turn|>"
  },
  "class_type": "PrimitiveStringMultiline",
  "_meta": {
   "title": "REWRITE_SYSTEM_PROMPT"
  }
 },
 "175:170": {
  "inputs": {
   "string": "<|turn>user\n{user_prompt}<|turn|>\n<|turn>model\n",
   "find": "{user_prompt}",
   "replace": [
    "171",
    0
   ]
  },
  "class_type": "StringReplace",
  "_meta": {
   "title": "Replace Text"
  }
 },
 "175:166": {
  "inputs": {
   "delimiter": "",
   "string_a": [
    "175:165",
    0
   ],
   "string_b": [
    "175:170",
    0
   ]
  },
  "class_type": "StringConcatenate",
  "_meta": {
   "title": "Concatenate Text"
  }
 },
 "175:164": {
  "inputs": {
   "max_length": 2048,
   "sampling_mode": "on",
   "thinking": false,
   "use_default_template": false,
   "mtp": "auto",
   "clip": [
    "175:167",
    0
   ],
   "prompt": [
    "175:166",
    0
   ],
   "sampling_mode.temperature": 0.7,
   "sampling_mode.top_k": 64,
   "sampling_mode.top_p": 0.95,
   "sampling_mode.min_p": 0.05,
   "sampling_mode.repetition_penalty": 1.05,
   "sampling_mode.presence_penalty": 0,
   "sampling_mode.seed": 0,
   "images.image1": [
    "213",
    0
   ]
  },
  "class_type": "TextGenerateV2",
  "_meta": {
   "title": "Generate Text"
  }
 },
 "175:167": {
  "inputs": {
   "clip_name": "gemma4_e4b_it_fp8_scaled.safetensors",
   "type": "stable_diffusion",
   "device": "default"
  },
  "class_type": "CLIPLoader",
  "_meta": {
   "title": "Load CLIP"
  }
 },
 "175:198": {
  "inputs": {
   "key": "prompt",
   "json_string": [
    "175:202",
    0
   ]
  },
  "class_type": "JsonExtractString",
  "_meta": {
   "title": "Extract Text from JSON"
  }
 },
 "175:201": {
  "inputs": {
   "regex_pattern": "^```(?:json)?\\s*\\n?",
   "replace": "",
   "case_insensitive": false,
   "multiline": false,
   "dotall": false,
   "count": 1,
   "string": [
    "175:164",
    0
   ]
  },
  "class_type": "RegexReplace",
  "_meta": {
   "title": "Replace Text (Regex)"
  }
 },
 "175:202": {
  "inputs": {
   "regex_pattern": "\\n?```\\s*$",
   "replace": "",
   "case_insensitive": false,
   "multiline": false,
   "dotall": false,
   "count": 1,
   "string": [
    "175:201",
    0
   ]
  },
  "class_type": "RegexReplace",
  "_meta": {
   "title": "Replace Text (Regex)"
  }
 },
 "176": {
  "inputs": {
   "switch": [
    "177",
    0
   ],
   "on_false": [
    "171",
    0
   ],
   "on_true": [
    "175:198",
    0
   ]
  },
  "class_type": "ComfySwitchNode",
  "_meta": {
   "title": "If/Else Switch"
  }
 },
 "177": {
  "inputs": {
   "value": false
  },
  "class_type": "PrimitiveBoolean",
  "_meta": {
   "title": "Enable Prompt Refine?"
  }
 },
 "188": {
  "inputs": {
   "text": "",
   "clip": [
    "6",
    1
   ]
  },
  "class_type": "CLIPTextEncode",
  "_meta": {
   "title": "CLIP Text Encode (Prompt)"
  }
 },
 "213": {
  "inputs": {
   "image": "noir_portrait.png"
  },
  "class_type": "LoadImage",
  "_meta": {
   "title": "Load Image"
  }
 },
 "218": {
  "inputs": {
   "expression": "floor(a/32)*32",
   "values.a": [
    "157",
    0
   ]
  },
  "class_type": "ComfyMathExpression",
  "_meta": {
   "title": "Math Expression"
  }
 },
 "219": {
  "inputs": {
   "expression": "floor(a/32)*32",
   "values.a": [
    "157",
    1
   ]
  },
  "class_type": "ComfyMathExpression",
  "_meta": {
   "title": "Math Expression"
  }
 },
 "221": {
  "inputs": {
   "source": [
    "176",
    0
   ]
  },
  "class_type": "PreviewAny",
  "_meta": {
   "title": "Preview as Text"
  }
 },
 "156": {
  "inputs": {
   "width": 2048,
   "height": 2048,
   "batch_size": 1
  },
  "class_type": "EmptyHiDreamO1LatentImage",
  "_meta": {
   "title": "Empty HiDream-O1 Latent Image"
  }
 },
 "172": {
  "inputs": {
   "batch_size": 1,
   "width": [
    "218",
    1
   ],
   "height": [
    "219",
    1
   ]
  },
  "class_type": "EmptyHiDreamO1LatentImage",
  "_meta": {
   "title": "Empty HiDream-O1 Latent Image"
  }
 },
 "171": {
  "inputs": {
   "value": "Graceful female skincare shot, light nude makeup, holding essence bottle, warm ivory backdrop, soft diffused light"
  },
  "class_type": "PrimitiveStringMultiline",
  "_meta": {
   "title": "User Prompt"
  }
 },
 "227": {
  "inputs": {
   "filename_prefix": "hidream_o1",
   "images": [
    "105",
    0
   ]
  },
  "class_type": "SaveImage",
  "_meta": {
   "title": "Save Image"
  }
 },
 "230": {
  "inputs": {
   "sampler_name": "dpmpp_2m_sde_gpu"
  },
  "class_type": "KSamplerSelect",
  "_meta": {
   "title": "KSamplerSelect"
  }
 },
 "232": {
  "inputs": {
   "start_percent": 0.8,
   "end_percent": 1,
   "pattern": "single_shift",
   "passes": "ramp_2_4",
   "blend": "median",
   "strength": 1,
   "model": [
    "124",
    0
   ]
  },
  "class_type": "HiDreamO1PatchSeamSmoothing",
  "_meta": {
   "title": "HiDream-O1 Patch Seam Smoothing"
  }
 }
}