workflow / IC-light-Inpaint-Portrait.json
phamhungd's picture
Upload 24 files
574c311 verified
{
"last_node_id": 51,
"last_link_id": 101,
"nodes": [
{
"id": 1,
"type": "ICLightConditioning",
"pos": [
924,
362
],
"size": {
"0": 342.5999755859375,
"1": 138
},
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1,
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2
},
{
"name": "vae",
"type": "VAE",
"link": 9,
"slot_index": 2
},
{
"name": "foreground",
"type": "LATENT",
"link": 36,
"slot_index": 3
},
{
"name": "opt_background",
"type": "LATENT",
"link": null,
"slot_index": 4
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
10
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
11
],
"shape": 3
},
{
"name": "empty_latent",
"type": "LATENT",
"links": [
12
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ICLightConditioning"
},
"widgets_values": [
0.182
]
},
{
"id": 3,
"type": "CLIPTextEncode",
"pos": [
477,
552
],
"size": {
"0": 400,
"1": 200
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 4
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"(low quality:1.15)"
]
},
{
"id": 5,
"type": "VAEEncode",
"pos": [
678,
834
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 88,
"slot_index": 0
},
{
"name": "vae",
"type": "VAE",
"link": 27,
"slot_index": 1
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
36
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 9,
"type": "KSampler",
"pos": [
1312,
305
],
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 37
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 10
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 11,
"slot_index": 2
},
{
"name": "latent_image",
"type": "LATENT",
"link": 12
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
14
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
1075152754350620,
"randomize",
32,
8,
"euler",
"normal",
1
]
},
{
"id": 10,
"type": "VAEDecode",
"pos": [
1709,
370
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 14
},
{
"name": "vae",
"type": "VAE",
"link": 15
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
16,
90
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 11,
"type": "SaveImage",
"pos": [
2027,
-84
],
"size": {
"0": 426.62890625,
"1": 510.44140625
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 16
}
],
"properties": {
"Node name for S&R": "SaveImage"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 13,
"type": "ICLightApplyMaskGrey",
"pos": [
36,
837
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 55
},
{
"name": "alpha",
"type": "MASK",
"link": 23
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
25,
87
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ICLightApplyMaskGrey"
}
},
{
"id": 16,
"type": "easy imageRemBg",
"pos": [
-329,
844
],
"size": {
"0": 315,
"1": 314
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 86,
"slot_index": 0
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
55
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
23,
97
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "easy imageRemBg"
},
"widgets_values": [
"RMBG-1.4",
"Preview",
"ComfyUI",
false
]
},
{
"id": 18,
"type": "PreviewImage",
"pos": [
302,
1046
],
"size": {
"0": 316.3036193847656,
"1": 455.12860107421875
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 25
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 34,
"type": "MaskToImage",
"pos": [
2016,
821
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 98
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
95
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 38,
"type": "Image Blend by Mask",
"pos": [
2306,
560
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "image_a",
"type": "IMAGE",
"link": 94
},
{
"name": "image_b",
"type": "IMAGE",
"link": 78
},
{
"name": "mask",
"type": "IMAGE",
"link": 96
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
79
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "Image Blend by Mask"
},
"widgets_values": [
0.5
]
},
{
"id": 39,
"type": "SaveImage",
"pos": [
2523,
-110
],
"size": {
"0": 460.5460205078125,
"1": 583.6355590820312
},
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 79
}
],
"properties": {
"Node name for S&R": "SaveImage"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 40,
"type": "ConstrainImage|pysssss",
"pos": [
307,
838
],
"size": {
"0": 315,
"1": 154
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 87
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
88
],
"slot_index": 0,
"shape": 6
}
],
"properties": {
"Node name for S&R": "ConstrainImage|pysssss"
},
"widgets_values": [
1024,
1024,
0,
0,
"no"
]
},
{
"id": 44,
"type": "ImageScale",
"pos": [
1944,
558
],
"size": {
"0": 315,
"1": 130
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 90
},
{
"name": "width",
"type": "INT",
"link": 92,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 93,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
94
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 47,
"type": "ImageBlur",
"pos": [
2254,
823
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 95
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
96,
100
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
10,
1
]
},
{
"id": 50,
"type": "PreviewImage",
"pos": [
2659,
624
],
"size": {
"0": 273.2752685546875,
"1": 273.7765808105469
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 100
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 51,
"type": "Note",
"pos": [
119,
342
],
"size": {
"0": 310.9923400878906,
"1": 167.09852600097656
},
"flags": {},
"order": 0,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"#Workflow IC-Light Inpaint, giúp thay đổi background ảnh chân dung, cân bằng lại ánh sáng cho phù hợp\nYêu cầu: Chạy với chế độ chuẩn (Bỏ check Prune)\n\nComfyUI Colab:\n- Creator: stablediffusion.vn\n- Website: sdvn.me | comfy.vn | fluxai.vn\n- Document: bit.ly/sdvn-lib\n- Skills training: hungdiffusion.com"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 24,
"type": "LoadAndApplyICLightUnet",
"pos": [
481,
163
],
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 38,
"slot_index": 0
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
37
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadAndApplyICLightUnet"
},
"widgets_values": [
"iclight_sd15_fc_unet_ldm.safetensors"
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
111,
168
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
38
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
3,
4
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
9,
15,
27
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"Realistic-Vision-v5.safetensors"
]
},
{
"id": 2,
"type": "CLIPTextEncode",
"pos": [
477,
276
],
"size": {
"0": 400,
"1": 200
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3,
"slot_index": 0
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"1girl portrait, flower background,blue sky, film gain, best quality"
]
},
{
"id": 45,
"type": "Get Image Size",
"pos": [
1678,
625
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 101
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
92
],
"slot_index": 0,
"shape": 3
},
{
"name": "height",
"type": "INT",
"links": [
93
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "Get Image Size"
}
},
{
"id": 48,
"type": "GrowMask",
"pos": [
1674,
818
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 97
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
98
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GrowMask"
},
"widgets_values": [
-2,
true
]
},
{
"id": 6,
"type": "LoadImage",
"pos": [
-698,
842
],
"size": {
"0": 315,
"1": 314
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
78,
86,
101
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"image.jpg",
"image"
]
}
],
"links": [
[
1,
2,
0,
1,
0,
"CONDITIONING"
],
[
2,
3,
0,
1,
1,
"CONDITIONING"
],
[
3,
4,
1,
2,
0,
"CLIP"
],
[
4,
4,
1,
3,
0,
"CLIP"
],
[
9,
4,
2,
1,
2,
"VAE"
],
[
10,
1,
0,
9,
1,
"CONDITIONING"
],
[
11,
1,
1,
9,
2,
"CONDITIONING"
],
[
12,
1,
2,
9,
3,
"LATENT"
],
[
14,
9,
0,
10,
0,
"LATENT"
],
[
15,
4,
2,
10,
1,
"VAE"
],
[
16,
10,
0,
11,
0,
"IMAGE"
],
[
23,
16,
1,
13,
1,
"MASK"
],
[
25,
13,
0,
18,
0,
"IMAGE"
],
[
27,
4,
2,
5,
1,
"VAE"
],
[
36,
5,
0,
1,
3,
"LATENT"
],
[
37,
24,
0,
9,
0,
"MODEL"
],
[
38,
4,
0,
24,
0,
"MODEL"
],
[
55,
16,
0,
13,
0,
"IMAGE"
],
[
78,
6,
0,
38,
1,
"IMAGE"
],
[
79,
38,
0,
39,
0,
"IMAGE"
],
[
86,
6,
0,
16,
0,
"IMAGE"
],
[
87,
13,
0,
40,
0,
"IMAGE"
],
[
88,
40,
0,
5,
0,
"IMAGE"
],
[
90,
10,
0,
44,
0,
"IMAGE"
],
[
92,
45,
0,
44,
1,
"INT"
],
[
93,
45,
1,
44,
2,
"INT"
],
[
94,
44,
0,
38,
0,
"IMAGE"
],
[
95,
34,
0,
47,
0,
"IMAGE"
],
[
96,
47,
0,
38,
2,
"IMAGE"
],
[
97,
16,
1,
48,
0,
"MASK"
],
[
98,
48,
0,
34,
0,
"MASK"
],
[
100,
47,
0,
50,
0,
"IMAGE"
],
[
101,
6,
0,
45,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.5644739300537773,
"offset": [
-37.713815019398105,
150.0553730871757
]
}
},
"version": 0.4
}