Wan_Backup / custom_nodes /ComfyUI-RMBG /example_workflows /ReferenceLatentMask.json
Eji-Sensei14's picture
Upload folder using huggingface_hub
c6535db verified
{
"id": "8a52fd0c-be3d-403e-8cd5-4c0433887354",
"revision": 0,
"last_node_id": 66,
"last_link_id": 565,
"nodes": [
{
"id": 5,
"type": "FluxKontextImageScale",
"pos": [
-160,
270
],
"size": [
300.28448486328125,
26
],
"flags": {
"collapsed": false
},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 479
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
92,
328,
541
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "FluxKontextImageScale",
"widget_ue_connectable": {}
},
"widgets_values": []
},
{
"id": 8,
"type": "CLIPTextEncode",
"pos": [
-160,
540
],
"size": [
300.28448486328125,
150
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": null
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
200,
290
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "CLIPTextEncode",
"widget_ue_connectable": {}
},
"widgets_values": [
"change the weather to snowing"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 10,
"type": "FluxGuidance",
"pos": [
635,
60
],
"size": [
220,
58
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 293
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
196,
198
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "FluxGuidance",
"widget_ue_connectable": {}
},
"widgets_values": [
2.5
],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 13,
"type": "KSampler",
"pos": [
890,
60
],
"size": [
270,
262
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": null
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 196
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 90
},
{
"name": "latent_image",
"type": "LATENT",
"link": 404
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
19
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "KSampler",
"widget_ue_connectable": {}
},
"widgets_values": [
100,
"fixed",
25,
1,
"euler",
"simple",
1
]
},
{
"id": 14,
"type": "VAEDecode",
"pos": [
950,
390
],
"size": [
210,
46
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 19
},
{
"name": "vae",
"type": "VAE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
542
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "VAEDecode",
"widget_ue_connectable": {}
},
"widgets_values": []
},
{
"id": 31,
"type": "AILab_MaskOverlay",
"pos": [
255,
270
],
"size": [
610,
380
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "image",
"shape": 7,
"type": "IMAGE",
"link": 328
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 329
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": []
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_MaskOverlay",
"widget_ue_connectable": {}
},
"widgets_values": [
0.5,
"#0000FF"
],
"color": "#2e3e57",
"bgcolor": "#4b5b73"
},
{
"id": 35,
"type": "VAEDecode",
"pos": [
930,
1160
],
"size": [
210,
46
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 84
},
{
"name": "vae",
"type": "VAE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
543
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "VAEDecode",
"widget_ue_connectable": {}
},
"widgets_values": []
},
{
"id": 36,
"type": "KSampler",
"pos": [
890,
850
],
"size": [
270,
262
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": null
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 199
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 209
},
{
"name": "latent_image",
"type": "LATENT",
"link": 93
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
84
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "KSampler",
"widget_ue_connectable": {}
},
"widgets_values": [
100,
"fixed",
25,
1,
"euler",
"simple",
1
]
},
{
"id": 38,
"type": "ConditioningZeroOut",
"pos": [
635,
170
],
"size": [
220,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 198
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
90
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "ConditioningZeroOut",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 39,
"type": "VAEEncode",
"pos": [
-160,
390
],
"size": [
300.28448486328125,
46
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 92
},
{
"name": "vae",
"type": "VAE",
"link": null
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
93,
142,
291
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "VAEEncode",
"widget_ue_connectable": {}
},
"widgets_values": []
},
{
"id": 40,
"type": "FluxGuidance",
"pos": [
640,
850
],
"size": [
220,
58
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 201
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
199,
210
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.43",
"Node name for S&R": "FluxGuidance",
"widget_ue_connectable": {}
},
"widgets_values": [
2.5
],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 42,
"type": "ReferenceLatent",
"pos": [
270,
850
],
"size": [
330,
50
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 200
},
{
"name": "latent",
"shape": 7,
"type": "LATENT",
"link": 142
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
201
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "ReferenceLatent",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 43,
"type": "ConditioningZeroOut",
"pos": [
640,
990
],
"size": [
220,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 210
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
209
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "ConditioningZeroOut",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 49,
"type": "AILab_ReferenceLatentMask",
"pos": [
260,
70
],
"size": [
340,
150
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 290
},
{
"name": "latent",
"type": "LATENT",
"link": 291
},
{
"name": "mask",
"type": "MASK",
"link": 477
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
293
]
},
{
"name": "LATENT",
"type": "LATENT",
"links": [
404
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
329
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_ReferenceLatentMask",
"widget_ue_connectable": {}
},
"widgets_values": [
5,
5,
10
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 57,
"type": "AILab_LoadImage",
"pos": [
-1610,
90
],
"size": [
1400,
890
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
479
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
477
]
},
{
"name": "MASK_IMAGE",
"type": "IMAGE",
"links": null
},
{
"name": "WIDTH",
"type": "INT",
"links": null
},
{
"name": "HEIGHT",
"type": "INT",
"links": null
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_LoadImage",
"widget_ue_connectable": {}
},
"widgets_values": [
"clipspace/clipspace-mask-1185821.png [input]",
"alpha",
"lanczos",
1.0000000000000002,
"longest_side",
0,
"image"
],
"color": "#2e3e57",
"bgcolor": "#4b5b73"
},
{
"id": 58,
"type": "AILab_ImagePreview",
"pos": [
1190,
-780
],
"size": [
1600,
740
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 541
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_ImagePreview",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#2e3e57",
"bgcolor": "#4b5b73"
},
{
"id": 60,
"type": "AILab_ImagePreview",
"pos": [
1190,
10
],
"size": [
1600,
740
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 542
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_ImagePreview",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#2e3e57",
"bgcolor": "#4b5b73"
},
{
"id": 61,
"type": "AILab_ImagePreview",
"pos": [
1190,
800
],
"size": [
1600,
740
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 543
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"Node name for S&R": "AILab_ImagePreview",
"widget_ue_connectable": {}
},
"widgets_values": [],
"color": "#2e3e57",
"bgcolor": "#4b5b73"
},
{
"id": 62,
"type": "UNETLoader",
"pos": [
-730,
-320
],
"size": [
270,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
562
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "UNETLoader",
"widget_ue_connectable": {}
},
"widgets_values": [
"flux1-dev-kontext_fp8_scaled.safetensors",
"fp8_e4m3fn"
]
},
{
"id": 63,
"type": "DualCLIPLoader",
"pos": [
-730,
-200
],
"size": [
270,
130
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [
563
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "DualCLIPLoader",
"widget_ue_connectable": {}
},
"widgets_values": [
"flux_t5xxl_fp8_e4m3fn.safetensors",
"clip_l.safetensors",
"flux",
"default"
]
},
{
"id": 65,
"type": "VAELoader",
"pos": [
-730,
-30
],
"size": [
270,
58
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
564
]
}
],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "comfy-core",
"ver": "0.3.44",
"Node name for S&R": "VAELoader",
"widget_ue_connectable": {}
},
"widgets_values": [
"ae.safetensors"
]
},
{
"id": 66,
"type": "Anything Everywhere3",
"pos": [
-410,
-220
],
"size": [
179.97518920898438,
66
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"color_on": "#B39DDB",
"label": "MODEL",
"name": "anything",
"shape": 7,
"type": "*",
"link": 562
},
{
"color_on": "#FFD500",
"label": "CLIP",
"name": "anything2",
"shape": 7,
"type": "*",
"link": 563
},
{
"color_on": "#FF6E6E",
"label": "VAE",
"name": "anything3",
"shape": 7,
"type": "*",
"link": 564
}
],
"outputs": [],
"properties": {
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"cnr_id": "cg-use-everywhere",
"ver": "5e7a8cd9bb2860e8bfb2559088d43be52090e0e8",
"Node name for S&R": "Anything Everywhere3",
"group_restricted": 0,
"color_restricted": 0,
"widget_ue_connectable": {}
},
"widgets_values": []
}
],
"links": [
[
19,
13,
0,
14,
0,
"LATENT"
],
[
84,
36,
0,
35,
0,
"LATENT"
],
[
90,
38,
0,
13,
2,
"CONDITIONING"
],
[
92,
5,
0,
39,
0,
"IMAGE"
],
[
93,
39,
0,
36,
3,
"LATENT"
],
[
142,
39,
0,
42,
1,
"LATENT"
],
[
196,
10,
0,
13,
1,
"CONDITIONING"
],
[
198,
10,
0,
38,
0,
"CONDITIONING"
],
[
199,
40,
0,
36,
1,
"CONDITIONING"
],
[
200,
8,
0,
42,
0,
"CONDITIONING"
],
[
201,
42,
0,
40,
0,
"CONDITIONING"
],
[
209,
43,
0,
36,
2,
"CONDITIONING"
],
[
210,
40,
0,
43,
0,
"CONDITIONING"
],
[
290,
8,
0,
49,
0,
"CONDITIONING"
],
[
291,
39,
0,
49,
1,
"LATENT"
],
[
293,
49,
0,
10,
0,
"CONDITIONING"
],
[
328,
5,
0,
31,
0,
"IMAGE"
],
[
329,
49,
2,
31,
1,
"MASK"
],
[
404,
49,
1,
13,
3,
"LATENT"
],
[
477,
57,
1,
49,
2,
"MASK"
],
[
479,
57,
0,
5,
0,
"IMAGE"
],
[
541,
5,
0,
58,
0,
"IMAGE"
],
[
542,
14,
0,
60,
0,
"IMAGE"
],
[
543,
35,
0,
61,
0,
"IMAGE"
],
[
562,
62,
0,
66,
0,
"MODEL"
],
[
563,
63,
0,
66,
1,
"CLIP"
],
[
564,
65,
0,
66,
2,
"VAE"
]
],
"groups": [
{
"id": 2,
"title": "Kontext Reference Latant Mask",
"bounding": [
240,
-10,
940,
670
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 3,
"title": "Reference Latant only",
"bounding": [
250,
780,
922.9866943359375,
439.6000061035156
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 4,
"title": "Kontext",
"bounding": [
-740,
-390,
519.9752197265625,
431.6000061035156
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.24761631176181034,
"offset": [
2133.3422488815177,
978.1256868268417
]
},
"frontendVersion": "1.23.4",
"ue_links": [
{
"downstream": 8,
"downstream_slot": 0,
"upstream": "63",
"upstream_slot": 0,
"controller": 66,
"type": "CLIP"
},
{
"downstream": 39,
"downstream_slot": 1,
"upstream": "65",
"upstream_slot": 0,
"controller": 66,
"type": "VAE"
},
{
"downstream": 14,
"downstream_slot": 1,
"upstream": "65",
"upstream_slot": 0,
"controller": 66,
"type": "VAE"
},
{
"downstream": 35,
"downstream_slot": 1,
"upstream": "65",
"upstream_slot": 0,
"controller": 66,
"type": "VAE"
},
{
"downstream": 13,
"downstream_slot": 0,
"upstream": "62",
"upstream_slot": 0,
"controller": 66,
"type": "MODEL"
},
{
"downstream": 36,
"downstream_slot": 0,
"upstream": "62",
"upstream_slot": 0,
"controller": 66,
"type": "MODEL"
}
],
"links_added_by_ue": [
556,
557,
558,
559,
560,
561
],
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}