Skip to content

Instantly share code, notes, and snippets.

@esdx
Forked from 4rmx/inpaint_only_masked.json
Last active January 1, 2024 01:18
Show Gist options
  • Save esdx/c0e307fde41a92be270e852286bf7fd6 to your computer and use it in GitHub Desktop.
Save esdx/c0e307fde41a92be270e852286bf7fd6 to your computer and use it in GitHub Desktop.
workflow for ComfyUI Inpainting (only masked). Expanded version with some comments.
{
"last_node_id": 496,
"last_link_id": 781,
"nodes": [
{
"id": 412,
"type": "Reroute",
"pos": [
254.29027860156253,
1011.5471391070557
],
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 665
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
651
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 423,
"type": "Reroute",
"pos": [
2410,
-50
],
"size": [
75,
26
],
"flags": {},
"order": 34,
"mode": 2,
"inputs": [
{
"name": "",
"type": "*",
"link": 672
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
673,
700
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 33,
"type": "VAEDecode",
"pos": [
950.6630424511718,
118.54713910705566
],
"size": {
"0": 140,
"1": 50
},
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 79
},
{
"name": "vae",
"type": "VAE",
"link": 90
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
29
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 25,
"type": "KSampler",
"pos": [
527.6630424511718,
119.54713910705566
],
"size": {
"0": 380,
"1": 262
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 46
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 661
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 662,
"slot_index": 2
},
{
"name": "latent_image",
"type": "LATENT",
"link": 146,
"slot_index": 3
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
79
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
427694003370975,
"fixed",
30,
7,
"dpmpp_2m_sde",
"karras",
1
]
},
{
"id": 91,
"type": "EmptyLatentImage",
"pos": [
246.6630424511719,
472.5471391070557
],
"size": {
"0": 210,
"1": 80
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "width",
"type": "INT",
"link": 147,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 148,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
146
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
768,
1
]
},
{
"id": 32,
"type": "Constant Number",
"pos": [
-95.33695754882811,
734.5471391070557
],
"size": {
"0": 210,
"1": 146
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "NUMBER",
"type": "NUMBER",
"links": [],
"shape": 3,
"slot_index": 0
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": [],
"shape": 3,
"slot_index": 1
},
{
"name": "INT",
"type": "INT",
"links": [
148,
665
],
"shape": 3,
"slot_index": 2
}
],
"title": "height",
"properties": {
"Node name for S&R": "Constant Number"
},
"widgets_values": [
"integer",
768,
""
]
},
{
"id": 31,
"type": "Constant Number",
"pos": [
-99.33695754882811,
540.5471391070557
],
"size": {
"0": 210,
"1": 146
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "NUMBER",
"type": "NUMBER",
"links": [],
"shape": 3,
"slot_index": 0
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": [],
"shape": 3,
"slot_index": 1
},
{
"name": "INT",
"type": "INT",
"links": [
147,
648
],
"shape": 3,
"slot_index": 2
}
],
"title": "width",
"properties": {
"Node name for S&R": "Constant Number"
},
"widgets_values": [
"integer",
512,
""
]
},
{
"id": 449,
"type": "Reroute",
"pos": [
1822.8575888671883,
414.03992797851566
],
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 718
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
713,
714
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
254.29027860156253,
981.5471391070557
],
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 648
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
722
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 417,
"type": "CLIPTextEncode",
"pos": [
-183.3369575488281,
285.5471391070557
],
"size": {
"0": 400,
"1": 200
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 756
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
662,
664
],
"shape": 3,
"slot_index": 0
}
],
"title": "CLIP Text Encode (Prompt) -",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"(worst quality:1.33), (low quality:1.33), (normal quality:1.33), lowres, nsfw, (text, watermark:1.15), embedding:easynegative, embedding:verybadimagenegative_v1.3, embedding:negative_hand-neg, "
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 416,
"type": "CLIPTextEncode",
"pos": [
-177.3369575488281,
42.54713910705567
],
"size": {
"0": 400,
"1": 200
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 755
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
661,
663
],
"shape": 3,
"slot_index": 0
}
],
"title": "CLIP Text Encode (Prompt) +",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"cute girl with flowers in the field"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 414,
"type": "Reroute",
"pos": [
1405.2291619531247,
1421.940756914061
],
"size": [
109.86754980468777,
29.919306396484217
],
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 651
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [],
"slot_index": 0,
"label": "height orig"
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1407.1870437890625,
1382.3390977343734
],
"size": [
107.64903218527479,
28.836330078491756
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 722
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [],
"slot_index": 0,
"label": "width orig"
}
],
"title": "width",
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 456,
"type": "Reroute",
"pos": [
1759.1870437890625,
1368.3390977343734
],
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 737,
"slot_index": 0
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
724,
729
],
"slot_index": 0,
"label": "width"
}
],
"title": "width",
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 470,
"type": "Reroute",
"pos": [
1754.1870437890625,
1408.3390977343734
],
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 740
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
741,
742
],
"label": "height",
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 454,
"type": "Note",
"pos": [
1179.2851160546873,
1492.0823135546868
],
"size": {
"0": 210,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"WH inputs"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 447,
"type": "Note",
"pos": [
-487,
-420
],
"size": [
244.35003662109375,
200.7723388671875
],
"flags": {},
"order": 3,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"The CLIP Set Last Layer node can be used to set the CLIP output layer from which to take the text embeddings. Encoding text into an embedding happens by the text being transformed by various layers in the CLIP model. Although traditionally diffusion models are conditioned on the output of the last layer in CLIP, some diffusion models have been conditioned on earlier layers and might not work as well when using the output of the last layer."
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 472,
"type": "Note",
"pos": [
1937.8575888671883,
484.03992797851555
],
"size": [
218.85172851562493,
115.51449145317088
],
"flags": {
"collapsed": false
},
"order": 4,
"mode": 0,
"title": "Image Crop Location",
"properties": {
"text": ""
},
"widgets_values": [
"Crop a image to specified location in top, left, right, and bottom locations relating to the pixel dimensions of the image in X and Y coordinats.\n\nCROP IMAGE same as cropped mask:"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 439,
"type": "Image Size to Number",
"pos": [
2198.8575888671876,
481.03992797851555
],
"size": {
"0": 170,
"1": 130
},
"flags": {},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 716
}
],
"outputs": [
{
"name": "width_num",
"type": "NUMBER",
"links": null,
"shape": 3,
"slot_index": 0
},
{
"name": "height_num",
"type": "NUMBER",
"links": null,
"shape": 3
},
{
"name": "width_float",
"type": "FLOAT",
"links": null,
"shape": 3,
"slot_index": 2
},
{
"name": "height_float",
"type": "FLOAT",
"links": null,
"shape": 3
},
{
"name": "width_int",
"type": "INT",
"links": [
689
],
"shape": 3,
"slot_index": 4
},
{
"name": "height_int",
"type": "INT",
"links": [
690
],
"shape": 3,
"slot_index": 5
}
],
"properties": {
"Node name for S&R": "Image Size to Number"
}
},
{
"id": 103,
"type": "Mask Gaussian Region",
"pos": [
2015.3379453125,
984
],
"size": {
"0": 210,
"1": 60
},
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "masks",
"type": "MASK",
"link": 491
}
],
"outputs": [
{
"name": "MASKS",
"type": "MASK",
"links": [
639
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Mask Gaussian Region"
},
"widgets_values": [
6
]
},
{
"id": 95,
"type": "Mask Dilate Region",
"pos": [
1857.3379453125,
880
],
"size": {
"0": 210,
"1": 60
},
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "masks",
"type": "MASK",
"link": 499
}
],
"outputs": [
{
"name": "MASKS",
"type": "MASK",
"links": [
491
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Mask Dilate Region"
},
"widgets_values": [
4
]
},
{
"id": 308,
"type": "ImageScale",
"pos": [
2464.564265962501,
1095.589729239844
],
"size": {
"0": 210,
"1": 122
},
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 475
},
{
"name": "width",
"type": "INT",
"link": 724,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 742,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
658,
706
],
"shape": 3,
"slot_index": 0
}
],
"title": "Upscale Mask",
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 298,
"type": "Image Crop Location",
"pos": [
1936,
671
],
"size": [
219.22172851562482,
124.75449145317089
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 713
},
{
"name": "top",
"type": "INT",
"link": 464,
"widget": {
"name": "top"
}
},
{
"name": "left",
"type": "INT",
"link": 764,
"widget": {
"name": "left"
}
},
{
"name": "right",
"type": "INT",
"link": 466,
"widget": {
"name": "right"
}
},
{
"name": "bottom",
"type": "INT",
"link": 760,
"widget": {
"name": "bottom"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
645,
678,
716
],
"shape": 3,
"slot_index": 0
},
{
"name": "CROP_DATA",
"type": "CROP_DATA",
"links": [
456
],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "Image Crop Location"
},
"widgets_values": [
0,
0,
256,
256
]
},
{
"id": 445,
"type": "SetLatentNoiseMask",
"pos": [
3081.425690625001,
210.9437475341797
],
"size": [
184.21929101562455,
52.59854162597645
],
"flags": {
"collapsed": false
},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 699
},
{
"name": "mask",
"type": "MASK",
"link": 745
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
701
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 446,
"type": "VAEEncode",
"pos": [
2823.425690625001,
144.9437475341796
],
"size": [
211.9002910156246,
48.93654162597642
],
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 698
},
{
"name": "vae",
"type": "VAE",
"link": 700
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
699
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 316,
"type": "ImageToMask",
"pos": [
2832.425690625001,
284.94374753418
],
"size": [
210,
58
],
"flags": {},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 658
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
745
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 410,
"type": "ImageScale",
"pos": [
2478,
667
],
"size": {
"0": 210,
"1": 122
},
"flags": {},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 645
},
{
"name": "width",
"type": "INT",
"link": 729,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 741,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
698,
707
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 357,
"type": "VAEDecode",
"pos": [
3645.425690625001,
199.9437475341796
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 558
},
{
"name": "vae",
"type": "VAE",
"link": 673
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
560,
683
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 403,
"type": "ImageBlend",
"pos": [
2830,
1070
],
"size": {
"0": 315,
"1": 102
},
"flags": {},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "image1",
"type": "IMAGE",
"link": 707
},
{
"name": "image2",
"type": "IMAGE",
"link": 706
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
652
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageBlend"
},
"widgets_values": [
0.5,
"normal"
]
},
{
"id": 415,
"type": "PreviewImage",
"pos": [
3178,
1077
],
"size": [
385.7808283025561,
366.3663607510648
],
"flags": {},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 652
}
],
"title": "Preview Mask over Image cropped and upscaled",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 427,
"type": "PreviewImage",
"pos": [
2322,
1423
],
"size": {
"0": 210,
"1": 250
},
"flags": {},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 678
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 475,
"type": "PreviewImage",
"pos": [
2608,
1424
],
"size": [
213.9022484374982,
246
],
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 754
}
],
"title": "Preview Mask",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 469,
"type": "CM_IntBinaryOperation",
"pos": [
1409.1870437890625,
1494.3390977343734
],
"size": [
210,
106
],
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
737,
740
],
"shape": 3,
"slot_index": 0
}
],
"title": "Custom width",
"properties": {
"Node name for S&R": "CM_IntBinaryOperation"
},
"widgets_values": [
"Add",
640,
0
]
},
{
"id": 478,
"type": "Note",
"pos": [
2456,
287
],
"size": [
229.77165039062493,
109.84948806762696
],
"flags": {
"collapsed": false
},
"order": 6,
"mode": 0,
"title": "Upscale image and mask",
"properties": {
"text": ""
},
"widgets_values": [
"to the same size\n\nsize defined in custom WH node group or same as initial image size\n\nsame as mask size in a1111"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 419,
"type": "Reroute",
"pos": [
450,
-99
],
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 664
}
],
"outputs": [
{
"name": "",
"type": "CONDITIONING",
"links": [
669
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 418,
"type": "Reroute",
"pos": [
451,
-135
],
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 663
}
],
"outputs": [
{
"name": "",
"type": "CONDITIONING",
"links": [
734
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 421,
"type": "Reroute",
"pos": [
1737,
-127
],
"size": [
75,
26
],
"flags": {},
"order": 33,
"mode": 2,
"inputs": [
{
"name": "",
"type": "*",
"link": 738
}
],
"outputs": [
{
"name": "",
"type": "CONDITIONING",
"links": [
671
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 422,
"type": "Reroute",
"pos": [
1734,
-87
],
"size": [
75,
26
],
"flags": {},
"order": 41,
"mode": 2,
"inputs": [
{
"name": "",
"type": "*",
"link": 669
}
],
"outputs": [
{
"name": "",
"type": "CONDITIONING",
"links": [
753
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 468,
"type": "Reroute",
"pos": [
1600,
-124
],
"size": [
75,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 734
}
],
"outputs": [
{
"name": "",
"type": "CONDITIONING",
"links": [],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 467,
"type": "CLIPTextEncode",
"pos": [
1301,
-235
],
"size": [
377.7682983398438,
92.11864013671874
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 757
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
738
],
"shape": 3,
"slot_index": 0
}
],
"title": "CLIP Text Encode (Prompt) +",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"portrait of girl in golden crown"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 14,
"type": "CLIPSetLastLayer",
"pos": [
-709,
-285
],
"size": {
"0": 210,
"1": 60
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 687
}
],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPSetLastLayer"
},
"widgets_values": [
-2
]
},
{
"id": 13,
"type": "CheckpointLoaderSimple",
"pos": [
-1103,
-101
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 7,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
758
],
"shape": 3,
"slot_index": 0
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
687,
755,
756,
757
],
"shape": 3,
"slot_index": 1
},
{
"name": "VAE",
"type": "VAE",
"links": [
31
],
"shape": 3,
"slot_index": 2
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"aniverse_v15Pruned.safetensors"
]
},
{
"id": 42,
"type": "Reroute",
"pos": [
122,
-286
],
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 758
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
46,
750
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 420,
"type": "Reroute",
"pos": [
1728,
-298
],
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 2,
"inputs": [
{
"name": "",
"type": "*",
"link": 750
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
667
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 471,
"type": "Note",
"pos": [
1608,
921
],
"size": [
210,
100.01223023469777
],
"flags": {},
"order": 8,
"mode": 0,
"title": "Mask Crop Region",
"properties": {
"text": ""
},
"widgets_values": [
"Crop to dominant or minority region and return crop_data for pasting back. Additionally outputs region location and size for other nodes like Crop Image Location."
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 35,
"type": "Reroute",
"pos": [
449,
-66
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 31
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
90,
672
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 34,
"type": "PreviewImage",
"pos": [
1149,
121
],
"size": [
400.7646484375,
278.00282287597656
],
"flags": {},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 29
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 94,
"type": "Mask Crop Region",
"pos": [
1602.8575888671883,
649.0399279785157
],
"size": {
"0": 210,
"1": 222
},
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 719
}
],
"outputs": [
{
"name": "cropped_mask",
"type": "MASK",
"links": [
499
],
"shape": 3,
"slot_index": 0
},
{
"name": "crop_data",
"type": "CROP_DATA",
"links": [],
"shape": 3,
"slot_index": 1
},
{
"name": "top_int",
"type": "INT",
"links": [
464
],
"shape": 3,
"slot_index": 2
},
{
"name": "left_int",
"type": "INT",
"links": [
764
],
"shape": 3,
"slot_index": 3
},
{
"name": "right_int",
"type": "INT",
"links": [
466
],
"shape": 3,
"slot_index": 4
},
{
"name": "bottom_int",
"type": "INT",
"links": [
760
],
"shape": 3,
"slot_index": 5
},
{
"name": "width_int",
"type": "INT",
"links": [],
"shape": 3,
"slot_index": 6
},
{
"name": "height_int",
"type": "INT",
"links": [],
"shape": 3,
"slot_index": 7
}
],
"properties": {
"Node name for S&R": "Mask Crop Region"
},
"widgets_values": [
32,
"dominant"
]
},
{
"id": 290,
"type": "MaskToImage",
"pos": [
2151.3379453125,
1089
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 639
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
475,
754
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 450,
"type": "Reroute",
"pos": [
3949,
709
],
"size": [
75,
26
],
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 714
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
717,
778
],
"slot_index": 0,
"label": "Original image"
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 426,
"type": "ImageScale",
"pos": [
3944,
564
],
"size": [
227.17124951575352,
122
],
"flags": {},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 683
},
{
"name": "width",
"type": "INT",
"link": 689,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 690,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
696,
762
],
"shape": 3,
"slot_index": 0
}
],
"title": "Upscale Image (downscale)",
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 285,
"type": "Image Paste Crop",
"pos": [
4238,
709
],
"size": {
"0": 210,
"1": 122
},
"flags": {},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 717
},
{
"name": "crop_image",
"type": "IMAGE",
"link": 762
},
{
"name": "crop_data",
"type": "CROP_DATA",
"link": 456
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
777
],
"shape": 3,
"slot_index": 0
},
{
"name": "IMAGE",
"type": "IMAGE",
"links": [],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "Image Paste Crop"
},
"widgets_values": [
0,
0
]
},
{
"id": 491,
"type": "MaskToImage",
"pos": [
4288,
893
],
"size": [
185.63373862022127,
26
],
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 774
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
775
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 492,
"type": "Mask Gaussian Region",
"pos": [
4044,
895
],
"size": [
210,
59.08905029296875
],
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "masks",
"type": "MASK",
"link": 773
}
],
"outputs": [
{
"name": "MASKS",
"type": "MASK",
"links": [
774
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Mask Gaussian Region"
},
"widgets_values": [
8
]
},
{
"id": 487,
"type": "Reroute",
"pos": [
3935,
895
],
"size": [
90.2870105081347,
26.47023476844913
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 769
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
773
],
"label": "mask orig",
"slot_index": 0
}
],
"title": "mask orig",
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 443,
"type": "PreviewImage",
"pos": [
4438,
968
],
"size": {
"0": 210,
"1": 250
},
"flags": {},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 696
}
],
"title": "Preview result downscaled",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 480,
"type": "Note",
"pos": [
4249,
473
],
"size": [
300.71358269305256,
141.06385033977915
],
"flags": {
"collapsed": false
},
"order": 9,
"mode": 0,
"title": "Image Paste Crop",
"properties": {
"text": ""
},
"widgets_values": [
"this will paste processed images in the same exact location over original\nit is later mixed using original mask as rectangular region of pasted image might be visible othervise sometimes"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 356,
"type": "KSampler",
"pos": [
3294.425690625001,
-120.05625246582039
],
"size": {
"0": 315,
"1": 262
},
"flags": {},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 667
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 671
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 753
},
{
"name": "latent_image",
"type": "LATENT",
"link": 701
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
558
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
831754494517389,
"randomize",
20,
5.4,
"dpmpp_2m_sde",
"karras",
0.8
]
},
{
"id": 358,
"type": "PreviewImage",
"pos": [
3957,
199
],
"size": [
268.8543066406237,
255.76585937499965
],
"flags": {},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 560
}
],
"title": "Preview result",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 489,
"type": "Mix Images By Mask",
"pos": [
4504,
851
],
"size": [
164.44131215222296,
66
],
"flags": {},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "image1",
"type": "IMAGE",
"link": 778
},
{
"name": "image2",
"type": "IMAGE",
"link": 777
},
{
"name": "mask",
"type": "IMAGE",
"link": 775
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
776,
780
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Mix Images By Mask"
}
},
{
"id": 484,
"type": "SaveImage",
"pos": [
4715,
527
],
"size": [
424.56093750000036,
275.0147338867188
],
"flags": {},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 780
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 440,
"type": "PreviewImage",
"pos": [
4713,
851
],
"size": {
"0": 430,
"1": 610
},
"flags": {},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 776
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 452,
"type": "LoadImage",
"pos": [
1165,
590
],
"size": [
384.531005859375,
433.3600769042969
],
"flags": {},
"order": 10,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
718,
781
],
"shape": 3,
"slot_index": 0
},
{
"name": "MASK",
"type": "MASK",
"links": [
719,
769
],
"shape": 3,
"slot_index": 1
}
],
"title": "Past here image to process",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-28978580.700000048.png [input]",
"image"
]
},
{
"id": 496,
"type": "ImageSender",
"pos": [
1604,
1076
],
"size": [
226.36375288529848,
82
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 781
}
],
"properties": {
"Node name for S&R": "ImageSender"
},
"widgets_values": [
"ImgSender",
0
]
},
{
"id": 495,
"type": "ImageReceiver",
"pos": [
5158,
710
],
"size": [
472.22439453125025,
751.879362792969
],
"flags": {},
"order": 11,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "orig image to compare",
"properties": {
"Node name for S&R": "ImageReceiver"
},
"widgets_values": [
"ImgSender_temp_lsspd_00001_.png [temp]",
0,
false,
"",
false
]
}
],
"links": [
[
29,
33,
0,
34,
0,
"IMAGE"
],
[
31,
13,
2,
35,
0,
"*"
],
[
46,
42,
0,
25,
0,
"MODEL"
],
[
79,
25,
0,
33,
0,
"LATENT"
],
[
90,
35,
0,
33,
1,
"VAE"
],
[
146,
91,
0,
25,
3,
"LATENT"
],
[
147,
31,
2,
91,
0,
"INT"
],
[
148,
32,
2,
91,
1,
"INT"
],
[
456,
298,
1,
285,
2,
"CROP_DATA"
],
[
464,
94,
2,
298,
1,
"INT"
],
[
466,
94,
4,
298,
3,
"INT"
],
[
475,
290,
0,
308,
0,
"IMAGE"
],
[
491,
95,
0,
103,
0,
"MASK"
],
[
499,
94,
0,
95,
0,
"MASK"
],
[
558,
356,
0,
357,
0,
"LATENT"
],
[
560,
357,
0,
358,
0,
"IMAGE"
],
[
639,
103,
0,
290,
0,
"MASK"
],
[
645,
298,
0,
410,
0,
"IMAGE"
],
[
648,
31,
2,
411,
0,
"*"
],
[
651,
412,
0,
414,
0,
"*"
],
[
652,
403,
0,
415,
0,
"IMAGE"
],
[
658,
308,
0,
316,
0,
"IMAGE"
],
[
661,
416,
0,
25,
1,
"CONDITIONING"
],
[
662,
417,
0,
25,
2,
"CONDITIONING"
],
[
663,
416,
0,
418,
0,
"*"
],
[
664,
417,
0,
419,
0,
"*"
],
[
665,
32,
2,
412,
0,
"*"
],
[
667,
420,
0,
356,
0,
"MODEL"
],
[
669,
419,
0,
422,
0,
"*"
],
[
671,
421,
0,
356,
1,
"CONDITIONING"
],
[
672,
35,
0,
423,
0,
"*"
],
[
673,
423,
0,
357,
1,
"VAE"
],
[
678,
298,
0,
427,
0,
"IMAGE"
],
[
683,
357,
0,
426,
0,
"IMAGE"
],
[
687,
13,
1,
14,
0,
"CLIP"
],
[
689,
439,
4,
426,
1,
"INT"
],
[
690,
439,
5,
426,
2,
"INT"
],
[
696,
426,
0,
443,
0,
"IMAGE"
],
[
698,
410,
0,
446,
0,
"IMAGE"
],
[
699,
446,
0,
445,
0,
"LATENT"
],
[
700,
423,
0,
446,
1,
"VAE"
],
[
701,
445,
0,
356,
3,
"LATENT"
],
[
706,
308,
0,
403,
1,
"IMAGE"
],
[
707,
410,
0,
403,
0,
"IMAGE"
],
[
713,
449,
0,
298,
0,
"IMAGE"
],
[
714,
449,
0,
450,
0,
"*"
],
[
716,
298,
0,
439,
0,
"IMAGE"
],
[
717,
450,
0,
285,
0,
"IMAGE"
],
[
718,
452,
0,
449,
0,
"*"
],
[
719,
452,
1,
94,
0,
"MASK"
],
[
722,
411,
0,
413,
0,
"*"
],
[
724,
456,
0,
308,
1,
"INT"
],
[
729,
456,
0,
410,
1,
"INT"
],
[
734,
418,
0,
468,
0,
"*"
],
[
737,
469,
0,
456,
0,
"*"
],
[
738,
467,
0,
421,
0,
"*"
],
[
740,
469,
0,
470,
0,
"*"
],
[
741,
470,
0,
410,
2,
"INT"
],
[
742,
470,
0,
308,
2,
"INT"
],
[
745,
316,
0,
445,
1,
"MASK"
],
[
750,
42,
0,
420,
0,
"*"
],
[
753,
422,
0,
356,
2,
"CONDITIONING"
],
[
754,
290,
0,
475,
0,
"IMAGE"
],
[
755,
13,
1,
416,
0,
"CLIP"
],
[
756,
13,
1,
417,
0,
"CLIP"
],
[
757,
13,
1,
467,
0,
"CLIP"
],
[
758,
13,
0,
42,
0,
"*"
],
[
760,
94,
5,
298,
4,
"INT"
],
[
762,
426,
0,
285,
1,
"IMAGE"
],
[
764,
94,
3,
298,
2,
"INT"
],
[
769,
452,
1,
487,
0,
"*"
],
[
773,
487,
0,
492,
0,
"MASK"
],
[
774,
492,
0,
491,
0,
"MASK"
],
[
775,
491,
0,
489,
2,
"IMAGE"
],
[
776,
489,
0,
440,
0,
"IMAGE"
],
[
777,
285,
0,
489,
1,
"IMAGE"
],
[
778,
450,
0,
489,
0,
"IMAGE"
],
[
780,
489,
0,
484,
0,
"IMAGE"
],
[
781,
452,
0,
496,
0,
"IMAGE"
]
],
"groups": [
{
"title": "Txt2Img",
"bounding": [
-195,
-22,
1313,
1006
],
"color": "#444",
"font_size": 24,
"locked": false
},
{
"title": "WH input",
"bounding": [
1152,
1320,
738,
310
],
"color": "#3f789e",
"font_size": 24,
"locked": false
},
{
"title": "CROP IMAGE AND MASK",
"bounding": [
1579,
332,
813,
955
],
"color": "#3f789e",
"font_size": 24,
"locked": false
},
{
"title": "UPSCALE CROPPED",
"bounding": [
2427,
185,
297,
1100
],
"color": "#3f789e",
"font_size": 24,
"locked": false
},
{
"title": "PROCESS INPAINT AREA",
"bounding": [
2778,
-243,
1093,
715
],
"color": "#3f789e",
"font_size": 24,
"locked": false
},
{
"title": "DOWNSCALE AND PASTE BACK TO ORIGINAL",
"bounding": [
3933,
104,
748,
1156
],
"color": "#3f789e",
"font_size": 24,
"locked": false
}
],
"config": {},
"extra": {},
"version": 0.4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment