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
| 6 |
+
"weight_dtype": "default"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
"13": {
|
| 10 |
+
"class_type": "ModelSamplingAuraFlow",
|
| 11 |
+
"inputs": {
|
| 12 |
+
"model": [
|
| 13 |
+
"53:6",
|
| 14 |
+
0
|
| 15 |
+
],
|
| 16 |
+
"shift": 3.1
|
| 17 |
+
}
|
| 18 |
+
},
|
| 19 |
+
"14": {
|
| 20 |
+
"class_type": "CFGNorm",
|
| 21 |
+
"inputs": {
|
| 22 |
+
"model": [
|
| 23 |
+
"13",
|
| 24 |
+
0
|
| 25 |
+
],
|
| 26 |
+
"pre_cfg": false,
|
| 27 |
+
"strength": 1
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"15": {
|
| 31 |
+
"_meta": {
|
| 32 |
+
"title": "upscale_input_to_max_size"
|
| 33 |
+
},
|
| 34 |
+
"class_type": "PrimitiveBoolean",
|
| 35 |
+
"inputs": {
|
| 36 |
+
"value": true
|
| 37 |
+
}
|
| 38 |
+
},
|
| 39 |
+
"16": {
|
| 40 |
+
"_meta": {
|
| 41 |
+
"title": "downscale_input_to_max_size"
|
| 42 |
+
},
|
| 43 |
+
"class_type": "PrimitiveBoolean",
|
| 44 |
+
"inputs": {
|
| 45 |
+
"value": false
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"20": {
|
| 49 |
+
"_meta": {
|
| 50 |
+
"title": "Main Image"
|
| 51 |
+
},
|
| 52 |
+
"class_type": "LoadImage",
|
| 53 |
+
"inputs": {
|
| 54 |
+
"image": "733427737_18059858666742129_6215894921112236726_n.jpg"
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
"21": {
|
| 58 |
+
"_meta": {
|
| 59 |
+
"title": "Input max size (main)"
|
| 60 |
+
},
|
| 61 |
+
"class_type": "PrimitiveInt",
|
| 62 |
+
"inputs": {
|
| 63 |
+
"value": 2048
|
| 64 |
+
}
|
| 65 |
+
},
|
| 66 |
+
"27": {
|
| 67 |
+
"_meta": {
|
| 68 |
+
"title": "Main image config"
|
| 69 |
+
},
|
| 70 |
+
"class_type": "QwenEditConfigPreparer",
|
| 71 |
+
"inputs": {
|
| 72 |
+
"image": [
|
| 73 |
+
"20",
|
| 74 |
+
0
|
| 75 |
+
],
|
| 76 |
+
"mask": [
|
| 77 |
+
"64",
|
| 78 |
+
1
|
| 79 |
+
],
|
| 80 |
+
"ref_crop": "pad",
|
| 81 |
+
"ref_longest_edge": [
|
| 82 |
+
"54:5",
|
| 83 |
+
0
|
| 84 |
+
],
|
| 85 |
+
"ref_main_image": true,
|
| 86 |
+
"ref_upscale": "lanczos",
|
| 87 |
+
"to_ref": true,
|
| 88 |
+
"to_vl": true,
|
| 89 |
+
"vl_crop": "center",
|
| 90 |
+
"vl_resize": true,
|
| 91 |
+
"vl_target_size": 384,
|
| 92 |
+
"vl_upscale": "bicubic"
|
| 93 |
+
}
|
| 94 |
+
},
|
| 95 |
+
"3": {
|
| 96 |
+
"class_type": "CLIPLoader",
|
| 97 |
+
"inputs": {
|
| 98 |
+
"clip_name": "qwen_2.5_vl_7b.safetensors",
|
| 99 |
+
"device": "default",
|
| 100 |
+
"type": "qwen_image"
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"4": {
|
| 104 |
+
"class_type": "VAELoader",
|
| 105 |
+
"inputs": {
|
| 106 |
+
"vae_name": "qwen_image_vae.safetensors"
|
| 107 |
+
}
|
| 108 |
+
},
|
| 109 |
+
"40": {
|
| 110 |
+
"_meta": {
|
| 111 |
+
"title": "Qwen Edit Encode (prompt here)"
|
| 112 |
+
},
|
| 113 |
+
"class_type": "TextEncodeQwenImageEditPlusCustom_lrzjason",
|
| 114 |
+
"inputs": {
|
| 115 |
+
"clip": [
|
| 116 |
+
"3",
|
| 117 |
+
0
|
| 118 |
+
],
|
| 119 |
+
"configs": [
|
| 120 |
+
"27",
|
| 121 |
+
0
|
| 122 |
+
],
|
| 123 |
+
"instruction": "",
|
| 124 |
+
"prompt": "Keep the person exactly as they are, unchanged. Regenerate the background into a sharp, photorealistic, high-detail version of the same scene: crisp focus, clean fine texture, natural depth and perspective. Remove all blur, bokeh, compression artifacts, noise and distortion from the background. Match the lighting, color temperature and white balance to the subject. High quality, ultra sharp details, 4k.",
|
| 125 |
+
"return_full_refs_cond": true,
|
| 126 |
+
"vae": [
|
| 127 |
+
"4",
|
| 128 |
+
0
|
| 129 |
+
]
|
| 130 |
+
}
|
| 131 |
+
},
|
| 132 |
+
"41": {
|
| 133 |
+
"class_type": "QwenEditOutputExtractor",
|
| 134 |
+
"inputs": {
|
| 135 |
+
"custom_output": [
|
| 136 |
+
"40",
|
| 137 |
+
2
|
| 138 |
+
]
|
| 139 |
+
}
|
| 140 |
+
},
|
| 141 |
+
"42": {
|
| 142 |
+
"_meta": {
|
| 143 |
+
"title": "Negative (zeroed)"
|
| 144 |
+
},
|
| 145 |
+
"class_type": "ConditioningZeroOut",
|
| 146 |
+
"inputs": {
|
| 147 |
+
"conditioning": [
|
| 148 |
+
"40",
|
| 149 |
+
0
|
| 150 |
+
]
|
| 151 |
+
}
|
| 152 |
+
},
|
| 153 |
+
"43": {
|
| 154 |
+
"class_type": "KSampler",
|
| 155 |
+
"inputs": {
|
| 156 |
+
"cfg": [
|
| 157 |
+
"53:14",
|
| 158 |
+
0
|
| 159 |
+
],
|
| 160 |
+
"denoise": 1,
|
| 161 |
+
"latent_image": [
|
| 162 |
+
"40",
|
| 163 |
+
1
|
| 164 |
+
],
|
| 165 |
+
"model": [
|
| 166 |
+
"14",
|
| 167 |
+
0
|
| 168 |
+
],
|
| 169 |
+
"negative": [
|
| 170 |
+
"42",
|
| 171 |
+
0
|
| 172 |
+
],
|
| 173 |
+
"positive": [
|
| 174 |
+
"40",
|
| 175 |
+
0
|
| 176 |
+
],
|
| 177 |
+
"sampler_name": "euler",
|
| 178 |
+
"scheduler": "simple",
|
| 179 |
+
"seed": 440984114065874,
|
| 180 |
+
"steps": [
|
| 181 |
+
"53:11",
|
| 182 |
+
0
|
| 183 |
+
]
|
| 184 |
+
}
|
| 185 |
+
},
|
| 186 |
+
"44": {
|
| 187 |
+
"class_type": "VAEDecode",
|
| 188 |
+
"inputs": {
|
| 189 |
+
"samples": [
|
| 190 |
+
"43",
|
| 191 |
+
0
|
| 192 |
+
],
|
| 193 |
+
"vae": [
|
| 194 |
+
"4",
|
| 195 |
+
0
|
| 196 |
+
]
|
| 197 |
+
}
|
| 198 |
+
},
|
| 199 |
+
"45": {
|
| 200 |
+
"_meta": {
|
| 201 |
+
"title": "Remove padding"
|
| 202 |
+
},
|
| 203 |
+
"class_type": "CropWithPadInfo",
|
| 204 |
+
"inputs": {
|
| 205 |
+
"image": [
|
| 206 |
+
"44",
|
| 207 |
+
0
|
| 208 |
+
],
|
| 209 |
+
"pad_info": [
|
| 210 |
+
"41",
|
| 211 |
+
0
|
| 212 |
+
]
|
| 213 |
+
}
|
| 214 |
+
},
|
| 215 |
+
"5": {
|
| 216 |
+
"_meta": {
|
| 217 |
+
"title": "Sampling mode: 1=4-step / 2=8-step / 3=quality"
|
| 218 |
+
},
|
| 219 |
+
"class_type": "PrimitiveInt",
|
| 220 |
+
"inputs": {
|
| 221 |
+
"value": 2
|
| 222 |
+
}
|
| 223 |
+
},
|
| 224 |
+
"50": {
|
| 225 |
+
"class_type": "SaveImage",
|
| 226 |
+
"inputs": {
|
| 227 |
+
"filename_prefix": "qwen-bg-inpaint-true",
|
| 228 |
+
"images": [
|
| 229 |
+
"63",
|
| 230 |
+
0
|
| 231 |
+
]
|
| 232 |
+
}
|
| 233 |
+
},
|
| 234 |
+
"52": {
|
| 235 |
+
"_meta": {
|
| 236 |
+
"title": "User LoRAs"
|
| 237 |
+
},
|
| 238 |
+
"class_type": "Power Lora Loader (rgthree)",
|
| 239 |
+
"inputs": {
|
| 240 |
+
"lora_1": {
|
| 241 |
+
"lora": "Qwen_LoRA_Skin_Fix_v2.safetensors",
|
| 242 |
+
"on": false,
|
| 243 |
+
"strength": 1,
|
| 244 |
+
"strengthTwo": null
|
| 245 |
+
},
|
| 246 |
+
"lora_2": {
|
| 247 |
+
"lora": "Qwen_LoRA_Amateur_Photo_v1.safetensors",
|
| 248 |
+
"on": false,
|
| 249 |
+
"strength": 1,
|
| 250 |
+
"strengthTwo": null
|
| 251 |
+
},
|
| 252 |
+
"model": [
|
| 253 |
+
"1",
|
| 254 |
+
0
|
| 255 |
+
]
|
| 256 |
+
}
|
| 257 |
+
},
|
| 258 |
+
"53:1": {
|
| 259 |
+
"_meta": {
|
| 260 |
+
"title": "LoRA: Lightning 4 steps"
|
| 261 |
+
},
|
| 262 |
+
"class_type": "LoraLoaderModelOnly",
|
| 263 |
+
"inputs": {
|
| 264 |
+
"lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
|
| 265 |
+
"model": [
|
| 266 |
+
"52",
|
| 267 |
+
0
|
| 268 |
+
],
|
| 269 |
+
"strength_model": 1
|
| 270 |
+
}
|
| 271 |
+
},
|
| 272 |
+
"53:10": {
|
| 273 |
+
"_meta": {
|
| 274 |
+
"title": "Steps switch 4/8"
|
| 275 |
+
},
|
| 276 |
+
"class_type": "ComfySwitchNode",
|
| 277 |
+
"inputs": {
|
| 278 |
+
"on_false": [
|
| 279 |
+
"53:7",
|
| 280 |
+
0
|
| 281 |
+
],
|
| 282 |
+
"on_true": [
|
| 283 |
+
"53:8",
|
| 284 |
+
0
|
| 285 |
+
],
|
| 286 |
+
"switch": [
|
| 287 |
+
"53:3",
|
| 288 |
+
2
|
| 289 |
+
]
|
| 290 |
+
}
|
| 291 |
+
},
|
| 292 |
+
"53:11": {
|
| 293 |
+
"_meta": {
|
| 294 |
+
"title": "Steps switch quality"
|
| 295 |
+
},
|
| 296 |
+
"class_type": "ComfySwitchNode",
|
| 297 |
+
"inputs": {
|
| 298 |
+
"on_false": [
|
| 299 |
+
"53:10",
|
| 300 |
+
0
|
| 301 |
+
],
|
| 302 |
+
"on_true": [
|
| 303 |
+
"53:9",
|
| 304 |
+
0
|
| 305 |
+
],
|
| 306 |
+
"switch": [
|
| 307 |
+
"53:4",
|
| 308 |
+
2
|
| 309 |
+
]
|
| 310 |
+
}
|
| 311 |
+
},
|
| 312 |
+
"53:12": {
|
| 313 |
+
"_meta": {
|
| 314 |
+
"title": "CFG (lightning)"
|
| 315 |
+
},
|
| 316 |
+
"class_type": "PrimitiveFloat",
|
| 317 |
+
"inputs": {
|
| 318 |
+
"value": 1.0
|
| 319 |
+
}
|
| 320 |
+
},
|
| 321 |
+
"53:13": {
|
| 322 |
+
"_meta": {
|
| 323 |
+
"title": "CFG (quality)"
|
| 324 |
+
},
|
| 325 |
+
"class_type": "PrimitiveFloat",
|
| 326 |
+
"inputs": {
|
| 327 |
+
"value": 3.0
|
| 328 |
+
}
|
| 329 |
+
},
|
| 330 |
+
"53:14": {
|
| 331 |
+
"_meta": {
|
| 332 |
+
"title": "CFG switch"
|
| 333 |
+
},
|
| 334 |
+
"class_type": "ComfySwitchNode",
|
| 335 |
+
"inputs": {
|
| 336 |
+
"on_false": [
|
| 337 |
+
"53:12",
|
| 338 |
+
0
|
| 339 |
+
],
|
| 340 |
+
"on_true": [
|
| 341 |
+
"53:13",
|
| 342 |
+
0
|
| 343 |
+
],
|
| 344 |
+
"switch": [
|
| 345 |
+
"53:4",
|
| 346 |
+
2
|
| 347 |
+
]
|
| 348 |
+
}
|
| 349 |
+
},
|
| 350 |
+
"53:2": {
|
| 351 |
+
"_meta": {
|
| 352 |
+
"title": "LoRA: Lightning 8 steps"
|
| 353 |
+
},
|
| 354 |
+
"class_type": "LoraLoaderModelOnly",
|
| 355 |
+
"inputs": {
|
| 356 |
+
"lora_name": "Qwen-Image-Edit-2511-Lightning-8steps-V1.0-bf16.safetensors",
|
| 357 |
+
"model": [
|
| 358 |
+
"52",
|
| 359 |
+
0
|
| 360 |
+
],
|
| 361 |
+
"strength_model": 1
|
| 362 |
+
}
|
| 363 |
+
},
|
| 364 |
+
"53:3": {
|
| 365 |
+
"_meta": {
|
| 366 |
+
"title": "is 8-step (mode == 2)"
|
| 367 |
+
},
|
| 368 |
+
"class_type": "ComfyMathExpression",
|
| 369 |
+
"inputs": {
|
| 370 |
+
"expression": "a == 2",
|
| 371 |
+
"values.a": [
|
| 372 |
+
"5",
|
| 373 |
+
0
|
| 374 |
+
]
|
| 375 |
+
}
|
| 376 |
+
},
|
| 377 |
+
"53:4": {
|
| 378 |
+
"_meta": {
|
| 379 |
+
"title": "is quality (mode == 3)"
|
| 380 |
+
},
|
| 381 |
+
"class_type": "ComfyMathExpression",
|
| 382 |
+
"inputs": {
|
| 383 |
+
"expression": "a == 3",
|
| 384 |
+
"values.a": [
|
| 385 |
+
"5",
|
| 386 |
+
0
|
| 387 |
+
]
|
| 388 |
+
}
|
| 389 |
+
},
|
| 390 |
+
"53:5": {
|
| 391 |
+
"_meta": {
|
| 392 |
+
"title": "Model switch 4/8"
|
| 393 |
+
},
|
| 394 |
+
"class_type": "ComfySwitchNode",
|
| 395 |
+
"inputs": {
|
| 396 |
+
"on_false": [
|
| 397 |
+
"53:1",
|
| 398 |
+
0
|
| 399 |
+
],
|
| 400 |
+
"on_true": [
|
| 401 |
+
"53:2",
|
| 402 |
+
0
|
| 403 |
+
],
|
| 404 |
+
"switch": [
|
| 405 |
+
"53:3",
|
| 406 |
+
2
|
| 407 |
+
]
|
| 408 |
+
}
|
| 409 |
+
},
|
| 410 |
+
"53:6": {
|
| 411 |
+
"_meta": {
|
| 412 |
+
"title": "Model switch quality"
|
| 413 |
+
},
|
| 414 |
+
"class_type": "ComfySwitchNode",
|
| 415 |
+
"inputs": {
|
| 416 |
+
"on_false": [
|
| 417 |
+
"53:5",
|
| 418 |
+
0
|
| 419 |
+
],
|
| 420 |
+
"on_true": [
|
| 421 |
+
"52",
|
| 422 |
+
0
|
| 423 |
+
],
|
| 424 |
+
"switch": [
|
| 425 |
+
"53:4",
|
| 426 |
+
2
|
| 427 |
+
]
|
| 428 |
+
}
|
| 429 |
+
},
|
| 430 |
+
"53:7": {
|
| 431 |
+
"_meta": {
|
| 432 |
+
"title": "Steps (4-step)"
|
| 433 |
+
},
|
| 434 |
+
"class_type": "PrimitiveInt",
|
| 435 |
+
"inputs": {
|
| 436 |
+
"value": 4
|
| 437 |
+
}
|
| 438 |
+
},
|
| 439 |
+
"53:8": {
|
| 440 |
+
"_meta": {
|
| 441 |
+
"title": "Steps (8-step)"
|
| 442 |
+
},
|
| 443 |
+
"class_type": "PrimitiveInt",
|
| 444 |
+
"inputs": {
|
| 445 |
+
"value": 8
|
| 446 |
+
}
|
| 447 |
+
},
|
| 448 |
+
"53:9": {
|
| 449 |
+
"_meta": {
|
| 450 |
+
"title": "Steps (quality)"
|
| 451 |
+
},
|
| 452 |
+
"class_type": "PrimitiveInt",
|
| 453 |
+
"inputs": {
|
| 454 |
+
"value": 12
|
| 455 |
+
}
|
| 456 |
+
},
|
| 457 |
+
"54:1": {
|
| 458 |
+
"_meta": {
|
| 459 |
+
"title": "native edge"
|
| 460 |
+
},
|
| 461 |
+
"class_type": "MathExpression|pysssss",
|
| 462 |
+
"inputs": {
|
| 463 |
+
"a": [
|
| 464 |
+
"20",
|
| 465 |
+
0
|
| 466 |
+
],
|
| 467 |
+
"expression": "max(a.width, a.height)"
|
| 468 |
+
}
|
| 469 |
+
},
|
| 470 |
+
"54:2": {
|
| 471 |
+
"_meta": {
|
| 472 |
+
"title": "upscaled edge"
|
| 473 |
+
},
|
| 474 |
+
"class_type": "MathExpression|pysssss",
|
| 475 |
+
"inputs": {
|
| 476 |
+
"a": [
|
| 477 |
+
"20",
|
| 478 |
+
0
|
| 479 |
+
],
|
| 480 |
+
"c": [
|
| 481 |
+
"21",
|
| 482 |
+
0
|
| 483 |
+
],
|
| 484 |
+
"expression": "max(a.width, a.height, c)"
|
| 485 |
+
}
|
| 486 |
+
},
|
| 487 |
+
"54:3": {
|
| 488 |
+
"_meta": {
|
| 489 |
+
"title": "apply upscale"
|
| 490 |
+
},
|
| 491 |
+
"class_type": "ComfySwitchNode",
|
| 492 |
+
"inputs": {
|
| 493 |
+
"on_false": [
|
| 494 |
+
"54:1",
|
| 495 |
+
0
|
| 496 |
+
],
|
| 497 |
+
"on_true": [
|
| 498 |
+
"54:2",
|
| 499 |
+
0
|
| 500 |
+
],
|
| 501 |
+
"switch": [
|
| 502 |
+
"15",
|
| 503 |
+
0
|
| 504 |
+
]
|
| 505 |
+
}
|
| 506 |
+
},
|
| 507 |
+
"54:4": {
|
| 508 |
+
"_meta": {
|
| 509 |
+
"title": "downscaled edge"
|
| 510 |
+
},
|
| 511 |
+
"class_type": "MathExpression|pysssss",
|
| 512 |
+
"inputs": {
|
| 513 |
+
"a": [
|
| 514 |
+
"54:3",
|
| 515 |
+
0
|
| 516 |
+
],
|
| 517 |
+
"c": [
|
| 518 |
+
"21",
|
| 519 |
+
0
|
| 520 |
+
],
|
| 521 |
+
"expression": "min(a, c)"
|
| 522 |
+
}
|
| 523 |
+
},
|
| 524 |
+
"54:5": {
|
| 525 |
+
"_meta": {
|
| 526 |
+
"title": "apply downscale"
|
| 527 |
+
},
|
| 528 |
+
"class_type": "ComfySwitchNode",
|
| 529 |
+
"inputs": {
|
| 530 |
+
"on_false": [
|
| 531 |
+
"54:3",
|
| 532 |
+
0
|
| 533 |
+
],
|
| 534 |
+
"on_true": [
|
| 535 |
+
"54:4",
|
| 536 |
+
0
|
| 537 |
+
],
|
| 538 |
+
"switch": [
|
| 539 |
+
"16",
|
| 540 |
+
0
|
| 541 |
+
]
|
| 542 |
+
}
|
| 543 |
+
},
|
| 544 |
+
"60": {
|
| 545 |
+
"_meta": {
|
| 546 |
+
"title": "Segment PERSON (SAM3)"
|
| 547 |
+
},
|
| 548 |
+
"class_type": "SAM3Segment",
|
| 549 |
+
"inputs": {
|
| 550 |
+
"background": "Alpha",
|
| 551 |
+
"confidence_threshold": 0.5,
|
| 552 |
+
"device": "Auto",
|
| 553 |
+
"image": [
|
| 554 |
+
"20",
|
| 555 |
+
0
|
| 556 |
+
],
|
| 557 |
+
"invert_output": false,
|
| 558 |
+
"mask_blur": 0,
|
| 559 |
+
"mask_offset": 0,
|
| 560 |
+
"max_segments": 0,
|
| 561 |
+
"output_mode": "Merged",
|
| 562 |
+
"prompt": "person",
|
| 563 |
+
"segment_pick": 0,
|
| 564 |
+
"unload_model": false
|
| 565 |
+
}
|
| 566 |
+
},
|
| 567 |
+
"61": {
|
| 568 |
+
"_meta": {
|
| 569 |
+
"title": "Person keep mask (grow+feather)"
|
| 570 |
+
},
|
| 571 |
+
"class_type": "GrowMaskWithBlur",
|
| 572 |
+
"inputs": {
|
| 573 |
+
"blur_radius": 6.0,
|
| 574 |
+
"decay_factor": 1.0,
|
| 575 |
+
"expand": 0,
|
| 576 |
+
"fill_holes": true,
|
| 577 |
+
"flip_input": false,
|
| 578 |
+
"incremental_expandrate": 0.0,
|
| 579 |
+
"lerp_alpha": 1.0,
|
| 580 |
+
"mask": [
|
| 581 |
+
"60",
|
| 582 |
+
1
|
| 583 |
+
],
|
| 584 |
+
"tapered_corners": true
|
| 585 |
+
}
|
| 586 |
+
},
|
| 587 |
+
"62": {
|
| 588 |
+
"_meta": {
|
| 589 |
+
"title": "Resize to original size"
|
| 590 |
+
},
|
| 591 |
+
"class_type": "ImageResizeKJ",
|
| 592 |
+
"inputs": {
|
| 593 |
+
"crop": "disabled",
|
| 594 |
+
"divisible_by": 0,
|
| 595 |
+
"get_image_size": [
|
| 596 |
+
"20",
|
| 597 |
+
0
|
| 598 |
+
],
|
| 599 |
+
"height": 1024,
|
| 600 |
+
"image": [
|
| 601 |
+
"45",
|
| 602 |
+
0
|
| 603 |
+
],
|
| 604 |
+
"keep_proportion": false,
|
| 605 |
+
"upscale_method": "lanczos",
|
| 606 |
+
"width": 1024
|
| 607 |
+
}
|
| 608 |
+
},
|
| 609 |
+
"63": {
|
| 610 |
+
"_meta": {
|
| 611 |
+
"title": "Original person over new background"
|
| 612 |
+
},
|
| 613 |
+
"class_type": "ImageCompositeMasked",
|
| 614 |
+
"inputs": {
|
| 615 |
+
"destination": [
|
| 616 |
+
"62",
|
| 617 |
+
0
|
| 618 |
+
],
|
| 619 |
+
"mask": [
|
| 620 |
+
"61",
|
| 621 |
+
0
|
| 622 |
+
],
|
| 623 |
+
"resize_source": false,
|
| 624 |
+
"source": [
|
| 625 |
+
"20",
|
| 626 |
+
0
|
| 627 |
+
],
|
| 628 |
+
"x": 0,
|
| 629 |
+
"y": 0
|
| 630 |
+
}
|
| 631 |
+
},
|
| 632 |
+
"64": {
|
| 633 |
+
"_meta": {
|
| 634 |
+
"title": "Background mask (latent inpaint)"
|
| 635 |
+
},
|
| 636 |
+
"class_type": "GrowMaskWithBlur",
|
| 637 |
+
"inputs": {
|
| 638 |
+
"blur_radius": 8.0,
|
| 639 |
+
"decay_factor": 1.0,
|
| 640 |
+
"expand": -4,
|
| 641 |
+
"fill_holes": true,
|
| 642 |
+
"flip_input": false,
|
| 643 |
+
"incremental_expandrate": 0.0,
|
| 644 |
+
"lerp_alpha": 1.0,
|
| 645 |
+
"mask": [
|
| 646 |
+
"60",
|
| 647 |
+
1
|
| 648 |
+
],
|
| 649 |
+
"tapered_corners": true
|
| 650 |
+
}
|
| 651 |
+
}
|
| 652 |
+
}
|