Skip to content

Instantly share code, notes, and snippets.

@framp
Created June 1, 2025 00:32
Show Gist options
  • Save framp/2878bc6bb750c7358200bc2f0e63f5ee to your computer and use it in GitHub Desktop.
Save framp/2878bc6bb750c7358200bc2f0e63f5ee to your computer and use it in GitHub Desktop.
{
"last_node_id": 114,
"last_link_id": 225,
"nodes": [
{
"id": 4,
"type": "GroundingDinoModelLoader (segment anything)",
"pos": {
"0": 1287,
"1": -1061
},
"size": {
"0": 541.800048828125,
"1": 58
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "GROUNDING_DINO_MODEL",
"type": "GROUNDING_DINO_MODEL",
"links": [
1
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GroundingDinoModelLoader (segment anything)"
},
"widgets_values": [
"GroundingDINO_SwinT_OGC (694MB)"
]
},
{
"id": 2,
"type": "SAM2ModelLoader (segment anything)",
"pos": {
"0": 1389,
"1": -1175
},
"size": {
"0": 428.4000244140625,
"1": 58
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "SAM_MODEL",
"type": "SAM_MODEL",
"links": [
2
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SAM2ModelLoader (segment anything)"
},
"widgets_values": [
"sam2_hiera_tiny"
]
},
{
"id": 23,
"type": "GrowMask",
"pos": {
"0": 1646,
"1": -1431
},
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 29
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
42
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GrowMask"
},
"widgets_values": [
20,
true
]
},
{
"id": 10,
"type": "InpaintModelConditioning",
"pos": {
"0": 1853,
"1": -1264
},
"size": {
"0": 216.59999084472656,
"1": 106
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 14,
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 12,
"slot_index": 1
},
{
"name": "vae",
"type": "VAE",
"link": 9
},
{
"name": "pixels",
"type": "IMAGE",
"link": 135
},
{
"name": "mask",
"type": "MASK",
"link": 43,
"slot_index": 4
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
76
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
77
],
"slot_index": 1,
"shape": 3
},
{
"name": "latent",
"type": "LATENT",
"links": [],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InpaintModelConditioning"
},
"color": "#223",
"bgcolor": "#335"
},
{
"id": 82,
"type": "Reroute",
"pos": {
"0": 1654,
"1": -1292
},
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 136
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
135
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 13,
"type": "CLIPTextEncode",
"pos": {
"0": 2465,
"1": -725
},
"size": {
"0": 407.14739990234375,
"1": 139.0554656982422
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 158
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
12
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
]
},
{
"id": 81,
"type": "VAEEncode",
"pos": {
"0": 1808,
"1": -873
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 131
},
{
"name": "vae",
"type": "VAE",
"link": 174
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 61,
"type": "MaskToImage",
"pos": {
"0": 1637,
"1": -1692
},
"size": {
"0": 264.5999755859375,
"1": 26
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 109
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 71,
"type": "InvertMask",
"pos": {
"0": 2146,
"1": -1655
},
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 115
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
116
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InvertMask"
}
},
{
"id": 84,
"type": "VAEEncode",
"pos": {
"0": 1524,
"1": -873
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 138
},
{
"name": "vae",
"type": "VAE",
"link": 172
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
140
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 34,
"type": "DifferentialDiffusion",
"pos": {
"0": 2051,
"1": -393
},
"size": {
"0": 277.20001220703125,
"1": 26
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 152
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "DifferentialDiffusion"
}
},
{
"id": 11,
"type": "CheckpointLoaderSimple",
"pos": {
"0": 2064,
"1": -917
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
186
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
187
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
9,
39,
168
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"realisticVisionV60B1_v51HyperVAE-inpainting.safetensors"
]
},
{
"id": 93,
"type": "Reroute",
"pos": {
"0": 2262.939697265625,
"1": -470.3523864746094
},
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 168
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
172,
174
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 91,
"type": "Reroute",
"pos": {
"0": 2058.5546875,
"1": -480.162841796875
},
"size": [
75,
26
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 186
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
152,
179
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 92,
"type": "Reroute",
"pos": {
"0": 2163,
"1": -477
},
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 187
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
157,
158
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 72,
"type": "ImageAndMaskPreview",
"pos": {
"0": 2098,
"1": -1580
},
"size": {
"0": 338.1775817871094,
"1": 385.5108642578125
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 117
},
{
"name": "mask",
"type": "MASK",
"link": 116
}
],
"outputs": [
{
"name": "composite",
"type": "IMAGE",
"links": [],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageAndMaskPreview"
},
"widgets_values": [
1,
"255, 255, 255",
false
]
},
{
"id": 107,
"type": "PreviewImage",
"pos": {
"0": 3451.614501953125,
"1": 610.9624633789062
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": null
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 108,
"type": "PreviewImage",
"pos": {
"0": 4041.389404296875,
"1": 543.0621337890625
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": null
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 77,
"type": "PreviewImage",
"pos": {
"0": 2044,
"1": -2089
},
"size": {
"0": 295.3953552246094,
"1": 378.82562255859375
},
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 209
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 74,
"type": "ImageAndMaskPreview",
"pos": {
"0": 1645,
"1": -2078
},
"size": {
"0": 315,
"1": 338
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 121
},
{
"name": "mask",
"type": "MASK",
"link": 122
}
],
"outputs": [
{
"name": "composite",
"type": "IMAGE",
"links": [
138,
209
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageAndMaskPreview"
},
"widgets_values": [
1,
"169,126,106",
true
]
},
{
"id": 27,
"type": "KSampler",
"pos": {
"0": 2032,
"1": -292
},
"size": {
"0": 315,
"1": 262
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 179
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 76
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 77
},
{
"name": "latent_image",
"type": "LATENT",
"link": 140,
"slot_index": 3
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
38
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
207551106420783,
"increment",
20,
1.5,
"dpmpp_2m",
"karras",
1
]
},
{
"id": 106,
"type": "PreviewImage",
"pos": {
"0": 3712,
"1": -1655
},
"size": {
"0": 515.0589599609375,
"1": 626.827392578125
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 206
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 28,
"type": "VAEDecode",
"pos": {
"0": 2749,
"1": -485
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 38
},
{
"name": "vae",
"type": "VAE",
"link": 39
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
206,
222
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 31,
"type": "ImpactGaussianBlurMask",
"pos": {
"0": 1389,
"1": -1603
},
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 42
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
43,
109,
115,
122,
224
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImpactGaussianBlurMask"
},
"widgets_values": [
10,
10
]
},
{
"id": 110,
"type": "ImageCompositeMasked",
"pos": {
"0": 3133,
"1": -869
},
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 223
},
{
"name": "source",
"type": "IMAGE",
"link": 222
},
{
"name": "mask",
"type": "MASK",
"link": 224
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
225
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 111,
"type": "PreviewImage",
"pos": {
"0": 3130,
"1": -1672
},
"size": [
468.78147281175416,
648.6963356017666
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 225
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 60,
"type": "LoadAndResizeImage",
"pos": {
"0": 2455,
"1": -1557
},
"size": {
"0": 443.2333984375,
"1": 649.5079956054688
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
105,
117,
121,
131,
136,
223
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3
},
{
"name": "width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "height",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "image_path",
"type": "STRING",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadAndResizeImage"
},
"widgets_values": [
"",
true,
512,
768,
1,
true,
0,
"alpha",
"",
"image"
]
},
{
"id": 3,
"type": "GroundingDinoSAMSegment (segment anything)",
"pos": {
"0": 1895,
"1": -1095
},
"size": {
"0": 529.199951171875,
"1": 122
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "sam_model",
"type": "SAM_MODEL",
"link": 2
},
{
"name": "grounding_dino_model",
"type": "GROUNDING_DINO_MODEL",
"link": 1
},
{
"name": "image",
"type": "IMAGE",
"link": 105
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
29
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GroundingDinoSAMSegment (segment anything)"
},
"widgets_values": [
"red ball",
0.3
]
},
{
"id": 12,
"type": "CLIPTextEncode",
"pos": {
"0": 2507,
"1": -843
},
"size": {
"0": 396.2165832519531,
"1": 76
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 157
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
14
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"person"
]
}
],
"links": [
[
1,
4,
0,
3,
1,
"GROUNDING_DINO_MODEL"
],
[
2,
2,
0,
3,
0,
"SAM_MODEL"
],
[
9,
11,
2,
10,
2,
"VAE"
],
[
12,
13,
0,
10,
1,
"CONDITIONING"
],
[
14,
12,
0,
10,
0,
"CONDITIONING"
],
[
29,
3,
1,
23,
0,
"MASK"
],
[
38,
27,
0,
28,
0,
"LATENT"
],
[
39,
11,
2,
28,
1,
"VAE"
],
[
42,
23,
0,
31,
0,
"MASK"
],
[
43,
31,
0,
10,
4,
"MASK"
],
[
76,
10,
0,
27,
1,
"CONDITIONING"
],
[
77,
10,
1,
27,
2,
"CONDITIONING"
],
[
105,
60,
0,
3,
2,
"IMAGE"
],
[
109,
31,
0,
61,
0,
"MASK"
],
[
115,
31,
0,
71,
0,
"MASK"
],
[
116,
71,
0,
72,
1,
"MASK"
],
[
117,
60,
0,
72,
0,
"IMAGE"
],
[
121,
60,
0,
74,
0,
"IMAGE"
],
[
122,
31,
0,
74,
1,
"MASK"
],
[
131,
60,
0,
81,
0,
"IMAGE"
],
[
135,
82,
0,
10,
3,
"IMAGE"
],
[
136,
60,
0,
82,
0,
"*"
],
[
138,
74,
0,
84,
0,
"IMAGE"
],
[
140,
84,
0,
27,
3,
"LATENT"
],
[
152,
91,
0,
34,
0,
"MODEL"
],
[
157,
92,
0,
12,
0,
"CLIP"
],
[
158,
92,
0,
13,
0,
"CLIP"
],
[
168,
11,
2,
93,
0,
"*"
],
[
172,
93,
0,
84,
1,
"VAE"
],
[
174,
93,
0,
81,
1,
"VAE"
],
[
179,
91,
0,
27,
0,
"MODEL"
],
[
186,
11,
0,
91,
0,
"*"
],
[
187,
11,
1,
92,
0,
"*"
],
[
206,
28,
0,
106,
0,
"IMAGE"
],
[
209,
74,
0,
77,
0,
"IMAGE"
],
[
222,
28,
0,
110,
1,
"IMAGE"
],
[
223,
60,
0,
110,
0,
"IMAGE"
],
[
224,
31,
0,
110,
2,
"MASK"
],
[
225,
110,
0,
111,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 3.400394858615878,
"offset": [
-3003.741157824247,
1439.3529686676263
]
}
},
"version": 0.4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment