json
{
"last_node_id": 13,
"last_link_id": 19,
"nodes": [
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415,
186
],
"size": {
"0": 422.84503173828125,
"1": 164.31304931640625
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3,
"label": "CLIP"
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
4,
12
],
"slot_index": 0,
"label": "条件"
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"1girl"
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
413,
389
],
"size": {
"0": 425.27801513671875,
"1": 180.6060791015625
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5,
"label": "CLIP"
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
6,
13
],
"slot_index": 0,
"label": "条件"
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
]
},
{
"id": 3,
"type": "KSampler",
"pos": [
863,
186
],
"size": {
"0": 315,
"1": 262
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1,
"label": "模型"
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 4,
"label": "正面提示词"
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 6,
"label": "负面提示词"
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2,
"label": "Latent"
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
7
],
"slot_index": 0,
"label": "Latent"
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
649445195815200,
"randomize",
30,
8,
"euler",
"normal",
1
]
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1210,
206
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7,
"label": "Latent"
},
{
"name": "vae",
"type": "VAE",
"link": 8,
"label": "VAE"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
14,
19
],
"slot_index": 0,
"label": "图像"
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 12,
"type": "UltralyticsDetectorProvider",
"pos": [
936.4710648803715,
790.8963348327626
],
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "BBOX_DETECTOR",
"type": "BBOX_DETECTOR",
"links": [
11
],
"shape": 3,
"label": "BBox检测",
"slot_index": 0
},
{
"name": "SEGM_DETECTOR",
"type": "SEGM_DETECTOR",
"links": null,
"shape": 3,
"label": "SEGM检测"
}
],
"properties": {
"Node name for S&R": "UltralyticsDetectorProvider"
},
"widgets_values": [
"face_yolov8m.pt"
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
-57,
241
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1,
15
],
"slot_index": 0,
"label": "模型"
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
3,
5,
16
],
"slot_index": 1,
"label": "CLIP"
},
{
"name": "VAE",
"type": "VAE",
"links": [
8,
17
],
"slot_index": 2,
"label": "VAE"
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"majicmixRealistic_v6.safetensors"
]
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
472,
641
],
"size": {
"0": 315,
"1": 106
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2
],
"slot_index": 0,
"label": "Latent"
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
512,
1
]
},
{
"id": 11,
"type": "SAMLoader",
"pos": [
932.6188379028322,
618.7302654388421
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "SAM_MODEL",
"type": "SAM_MODEL",
"links": [
10
],
"shape": 3,
"label": "SAM模型",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "SAMLoader"
},
"widgets_values": [
"sam_vit_b_01ec64.pth",
"AUTO"
]
},
{
"id": 10,
"type": "FaceDetailer",
"pos": [
1296.6188379028324,
616.7302654388421
],
"size": {
"0": 506.4000244140625,
"1": 808
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 14,
"label": "图像"
},
{
"name": "model",
"type": "MODEL",
"link": 15,
"label": "模型"
},
{
"name": "clip",
"type": "CLIP",
"link": 16,
"label": "CLIP"
},
{
"name": "vae",
"type": "VAE",
"link": 17,
"label": "VAE"
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 12,
"label": "正面提示词"
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 13,
"label": "负面提示词"
},
{
"name": "bbox_detector",
"type": "BBOX_DETECTOR",
"link": 11,
"label": "BBox检测"
},
{
"name": "sam_model_opt",
"type": "SAM_MODEL",
"link": 10,
"label": "SAM模型"
},
{
"name": "segm_detector_opt",
"type": "SEGM_DETECTOR",
"link": null,
"label": "Segm检测"
},
{
"name": "detailer_hook",
"type": "DETAILER_HOOK",
"link": null,
"label": "细化约束"
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
18
],
"shape": 3,
"label": "图像",
"slot_index": 0
},
{
"name": "cropped_refined",
"type": "IMAGE",
"links": null,
"shape": 6,
"label": "细化图像"
},
{
"name": "cropped_enhanced_alpha",
"type": "IMAGE",
"links": null,
"shape": 6,
"label": "细化部分"
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3,
"label": "遮罩"
},
{
"name": "detailer_pipe",
"type": "DETAILER_PIPE",
"links": null,
"shape": 3,
"label": "细化节点束"
},
{
"name": "cnet_images",
"type": "IMAGE",
"links": null,
"shape": 6,
"label": "ControlNet图像"
}
],
"properties": {
"Node name for S&R": "FaceDetailer"
},
"widgets_values": [
256,
true,
768,
435776973720344,
"randomize",
20,
8,
"euler",
"normal",
0.5,
5,
true,
true,
0.5,
10,
3,
"center-1",
0,
0.93,
0,
0.7,
"False",
10,
""
]
},
{
"id": 13,
"type": "PreviewImage",
"pos": [
1873,
200
],
"size": [
290.0943921875005,
277.78749324951195
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 18,
"label": "图像"
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 9,
"type": "SaveImage",
"pos": [
1494,
202
],
"size": [
292.5443300598147,
266.9587553771976
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 19,
"label": "图像",
"slot_index": 0
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
]
}
],
"links": [
[
1,
4,
0,
3,
0,
"MODEL"
],
[
2,
5,
0,
3,
3,
"LATENT"
],
[
3,
4,
1,
6,
0,
"CLIP"
],
[
4,
6,
0,
3,
1,
"CONDITIONING"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
6,
7,
0,
3,
2,
"CONDITIONING"
],
[
7,
3,
0,
8,
0,
"LATENT"
],
[
8,
4,
2,
8,
1,
"VAE"
],
[
10,
11,
0,
10,
7,
"SAM_MODEL"
],
[
11,
12,
0,
10,
6,
"BBOX_DETECTOR"
],
[
12,
6,
0,
10,
4,
"CONDITIONING"
],
[
13,
7,
0,
10,
5,
"CONDITIONING"
],
[
14,
8,
0,
10,
0,
"IMAGE"
],
[
15,
4,
0,
10,
1,
"MODEL"
],
[
16,
4,
1,
10,
2,
"CLIP"
],
[
17,
4,
2,
10,
3,
"VAE"
],
[
18,
10,
0,
13,
0,
"IMAGE"
],
[
19,
8,
0,
9,
0,
"IMAGE"
]
],
"groups": [
{
"title": "面部修复",
"bounding": [
913,
542,
921,
891
],
"color": "#3f789e",
"font_size": 24,
"locked": false
}
],
"config": {},
"extra": {},
"version": 0.4
}
导入之后,下载缺失节点
其中有个sam_vit_b_01ec64.pth,源码有可能下不了,需要手动下载,放到ComfyUI\models\sams,没有目录就新建一个
修复脸用的face_yolov8m.pt需要放到 ComfyUI\models\ultralytics\bbox