简介
ControlNet 是一个很强的插件,提供了很多种图片的控制方式,有的可以控制画面的结构,有的可以控制人物的姿势,还有的可以控制图片的画风,这对于提高AI绘画的质量特别有用。接下来就演示几种热门常用的控制方式
1.OpenPose(姿态控制预处理器)
姿态控制预处理器可以根据提供的图像将人物的骨骼脸部手部的姿态展示处理,通过这个预处理器可以很好的控制出图人物的姿态
2.Depth(深度预处理器)
深度预处理器可以将图片的空间的远近以黑白的形式展示出来,白近黑远,当我们上传一张图片通过OpenPose识别到手的位置,但骨骼图并不能描述手在身前还是身后的时候,那个深度预处理器就可以提现出作用了,当然还可以运用在一些建筑、室内等情况
3.LineArt(线条预处理器)
线条预处理器可以将图片用线条的形式描绘出来,可以很好的控制图片的细节
4.HED Soft-Edge(模糊线条预处理器)
模糊线条预处理器与线条预处理器类型也是用线条描绘图片,但仅大概描绘轮廓,更利于出图的随机性
接下来演示一下这四个预处理器效果,不同的预处理器之间是可以搭配使用的,根据不同的需求选择不用的预处理器来解决问题
附件工作流
复制Json内容到ComfyUI中即可
{
"last_node_id": 46,
"last_link_id": 65,
"nodes": [
{
"id": 31,
"type": "PreviewImage",
"pos": [
1110,
-1000
],
"size": {
"0": 210,
"1": 310
},
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 31,
"label": "图像"
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 29,
"type": "PreviewImage",
"pos": [
760,
-1000
],
"size": {
"0": 210,
"1": 310
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 30,
"label": "图像",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 34,
"type": "HEDPreprocessor",
"pos": [
1050,
-500
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 34,
"label": "图像"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
31,
54
],
"shape": 3,
"label": "图像",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "HEDPreprocessor"
},
"widgets_values": [
"enable",
512
]
},
{
"id": 32,
"type": "ControlNetLoader",
"pos": [
1060,
-640
],
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
53
],
"shape": 3,
"label": "ControlNet",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"control_v11p_sd15_softedge.pth"
]
},
{
"id": 25,
"type": "PreviewImage",
"pos": [
420,
-1000
],
"size": {
"0": 210,
"1": 310
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 29,
"label": "图像"
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 12,
"type": "ControlNetLoader",
"pos": [
30,
-640
],
"size": {
"0": 320,
"1": 60
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
47
],
"slot_index": 0,
"label": "ControlNet"
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"control_v11p_sd15_openpose.pth"
]
},
{
"id": 16,
"type": "OpenposePreprocessor",
"pos": [
30,
-540
],
"size": {
"0": 315,
"1": 150
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 22,
"label": "图像"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
24,
48
],
"shape": 3,
"label": "图像",
"slot_index": 0
},
{
"name": "POSE_KEYPOINT",
"type": "POSE_KEYPOINT",
"links": null,
"shape": 3,
"label": "姿态关键点"
}
],
"properties": {
"Node name for S&R": "OpenposePreprocessor"
},
"widgets_values": [
"enable",
"enable",
"enable",
512
]
},
{
"id": 23,
"type": "ControlNetLoader",
"pos": [
380,
-640
],
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
49
],
"shape": 3,
"label": "ControlNet",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"control_v11f1p_sd15_depth.pth"
]
},
{
"id": 21,
"type": "Zoe_DepthAnythingPreprocessor",
"pos": [
370,
-500
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 32,
"label": "图像",
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
29,
50
],
"shape": 3,
"label": "图像",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Zoe_DepthAnythingPreprocessor"
},
"widgets_values": [
"indoor",
512
]
},
{
"id": 30,
"type": "ControlNetLoader",
"pos": [
710,
-640
],
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
51
],
"shape": 3,
"label": "ControlNet",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"control_v11p_sd15_lineart.pth"
]
},
{
"id": 33,
"type": "LineArtPreprocessor",
"pos": [
710,
-500
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 33,
"label": "图像"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30,
52
],
"shape": 3,
"label": "图像",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LineArtPreprocessor"
},
"widgets_values": [
"disable",
512
]
},
{
"id": 35,
"type": "Efficient Loader",
"pos": [
2130,
690
],
"size": {
"0": 400,
"1": 462
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "lora_stack",
"type": "LORA_STACK",
"link": null,
"label": "LoRA堆"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": 55,
"label": "ControlNet堆",
"slot_index": 1
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": null,
"shape": 3,
"label": "模型"
},
{
"name": "CONDITIONING+",
"type": "CONDITIONING",
"links": null,
"shape": 3,
"label": "正面条件"
},
{
"name": "CONDITIONING-",
"type": "CONDITIONING",
"links": null,
"shape": 3,
"label": "负面条件"
},
{
"name": "LATENT",
"type": "LATENT",
"links": null,
"shape": 3,
"label": "Latent"
},
{
"name": "VAE",
"type": "VAE",
"links": null,
"shape": 3,
"label": "VAE"
},
{
"name": "CLIP",
"type": "CLIP",
"links": null,
"shape": 3,
"label": "CLIP"
},
{
"name": "DEPENDENCIES",
"type": "DEPENDENCIES",
"links": null,
"shape": 3,
"label": "依赖"
}
],
"properties": {
"Node name for S&R": "Efficient Loader"
},
"widgets_values": [
"AWPainting_v1.3.safetensors",
"Baked VAE",
-1,
"None",
1,
1,
"CLIP_POSITIVE",
"CLIP_NEGATIVE",
"none",
"comfy",
512,
512,
1
],
"color": "#2a363b",
"bgcolor": "#3f5159",
"shape": 1
},
{
"id": 41,
"type": "Control Net Stacker",
"pos": [
1720,
650
],
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "control_net",
"type": "CONTROL_NET",
"link": null,
"label": "ControlNet"
},
{
"name": "image",
"type": "IMAGE",
"link": null,
"label": "图像"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": null,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "CNET_STACK",
"type": "CONTROL_NET_STACK",
"links": [
55
],
"shape": 3,
"label": "ControlNet堆"
}
],
"properties": {
"Node name for S&R": "Control Net Stacker"
},
"widgets_values": [
1,
0,
1
],
"color": "#223322",
"bgcolor": "#335533",
"shape": 1
},
{
"id": 17,
"type": "PreviewImage",
"pos": [
70,
-1000
],
"size": {
"0": 210,
"1": 310
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 24,
"label": "图像"
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 37,
"type": "Control Net Stacker",
"pos": [
30,
-340
],
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 47,
"label": "ControlNet"
},
{
"name": "image",
"type": "IMAGE",
"link": 48,
"label": "图像"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": null,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "CNET_STACK",
"type": "CONTROL_NET_STACK",
"links": [
62
],
"shape": 3,
"label": "ControlNet堆",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Control Net Stacker"
},
"widgets_values": [
1,
0,
1
],
"color": "#223322",
"bgcolor": "#335533",
"shape": 1
},
{
"id": 38,
"type": "Control Net Stacker",
"pos": [
370,
-340
],
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 49,
"label": "ControlNet"
},
{
"name": "image",
"type": "IMAGE",
"link": 50,
"label": "图像"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": 62,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "CNET_STACK",
"type": "CONTROL_NET_STACK",
"links": [
63
],
"shape": 3,
"label": "ControlNet堆",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Control Net Stacker"
},
"widgets_values": [
0.2,
0,
1
],
"color": "#223322",
"bgcolor": "#335533",
"shape": 1
},
{
"id": 39,
"type": "Control Net Stacker",
"pos": [
710,
-340
],
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 51,
"label": "ControlNet"
},
{
"name": "image",
"type": "IMAGE",
"link": 52,
"label": "图像"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": 63,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "CNET_STACK",
"type": "CONTROL_NET_STACK",
"links": [
64
],
"shape": 3,
"label": "ControlNet堆",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Control Net Stacker"
},
"widgets_values": [
0.5,
0,
1
],
"color": "#223322",
"bgcolor": "#335533",
"shape": 1
},
{
"id": 40,
"type": "Control Net Stacker",
"pos": [
1050,
-340
],
"size": {
"0": 315,
"1": 146
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 53,
"label": "ControlNet",
"slot_index": 0
},
{
"name": "image",
"type": "IMAGE",
"link": 54,
"label": "图像",
"slot_index": 1
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": 64,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "CNET_STACK",
"type": "CONTROL_NET_STACK",
"links": [
65
],
"shape": 3,
"label": "ControlNet堆",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Control Net Stacker"
},
"widgets_values": [
0.5,
0,
1
],
"color": "#223322",
"bgcolor": "#335533",
"shape": 1
},
{
"id": 44,
"type": "SaveImage",
"pos": [
2220,
-630
],
"size": {
"0": 320,
"1": 270
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 61,
"label": "图像"
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 43,
"type": "KSampler (Efficient)",
"pos": [
1860,
-750
],
"size": {
"0": 330,
"1": 560
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 56,
"label": "模型"
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 57,
"label": "正面条件"
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 58,
"label": "负面条件"
},
{
"name": "latent_image",
"type": "LATENT",
"link": 59,
"label": "Latent"
},
{
"name": "optional_vae",
"type": "VAE",
"link": 60,
"label": "VAE(可选)"
},
{
"name": "script",
"type": "SCRIPT",
"link": null,
"label": "脚本"
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": null,
"shape": 3,
"label": "模型"
},
{
"name": "CONDITIONING+",
"type": "CONDITIONING",
"links": null,
"shape": 3,
"label": "正面条件"
},
{
"name": "CONDITIONING-",
"type": "CONDITIONING",
"links": null,
"shape": 3,
"label": "负面条件"
},
{
"name": "LATENT",
"type": "LATENT",
"links": null,
"shape": 3,
"label": "Latent"
},
{
"name": "VAE",
"type": "VAE",
"links": null,
"shape": 3,
"label": "VAE"
},
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
61
],
"shape": 3,
"label": "图像",
"slot_index": 5
}
],
"properties": {
"Node name for S&R": "KSampler (Efficient)"
},
"widgets_values": [
248390093388796,
null,
20,
10,
"dpmpp_2m",
"karras",
1,
"auto",
"true"
],
"color": "#222233",
"bgcolor": "#333355",
"shape": 1
},
{
"id": 42,
"type": "Efficient Loader",
"pos": [
1420,
-650
],
"size": {
"0": 400,
"1": 462.0000305175781
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "lora_stack",
"type": "LORA_STACK",
"link": null,
"label": "LoRA堆"
},
{
"name": "cnet_stack",
"type": "CONTROL_NET_STACK",
"link": 65,
"label": "ControlNet堆"
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
56
],
"shape": 3,
"label": "模型",
"slot_index": 0
},
{
"name": "CONDITIONING+",
"type": "CONDITIONING",
"links": [
57
],
"shape": 3,
"label": "正面条件",
"slot_index": 1
},
{
"name": "CONDITIONING-",
"type": "CONDITIONING",
"links": [
58
],
"shape": 3,
"label": "负面条件",
"slot_index": 2
},
{
"name": "LATENT",
"type": "LATENT",
"links": [
59
],
"shape": 3,
"label": "Latent",
"slot_index": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
60
],
"shape": 3,
"label": "VAE",
"slot_index": 4
},
{
"name": "CLIP",
"type": "CLIP",
"links": null,
"shape": 3,
"label": "CLIP"
},
{
"name": "DEPENDENCIES",
"type": "DEPENDENCIES",
"links": null,
"shape": 3,
"label": "依赖"
}
],
"properties": {
"Node name for S&R": "Efficient Loader"
},
"widgets_values": [
"AWPainting_v1.3.safetensors",
"Baked VAE",
-2,
"None",
1,
1,
"masterpiece, best quality, highres, 1girl, bare shoulders, brown hair, long hair, (orange dress:1.2), looking at viewer, forest, maple leaves,outdoors, wild, plants, cinematic lights, lightrays,depth of field, blurry_background, blurry_foreground, shiny luminious,",
"(hands), text, error, cropped, (worst quality:1.2), (low quality:1.2), normal quality, (jpeg artifacts:1.3), signature, watermark, username, blurry, artist name, monochrome, sketch, censorship, censor, (copyright:1.2), extra legs, (forehead mark) (depth of field) (emotionless) (penis), embedding:EasyNegative, embedding:badhandv4, ",
"none",
"comfy++",
768,
1152,
1
],
"color": "#443322",
"bgcolor": "#665533",
"shape": 1
},
{
"id": 11,
"type": "LoadImage",
"pos": [
-250,
-800
],
"size": [
220,
314
],
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
22,
32,
33,
34
],
"slot_index": 0,
"label": "图像"
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"label": "遮罩"
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"aimake_Example_1713001562048_49 (1) (3).jpg",
"image"
]
}
],
"links": [
[
22,
11,
0,
16,
0,
"IMAGE"
],
[
24,
16,
0,
17,
0,
"IMAGE"
],
[
29,
21,
0,
25,
0,
"IMAGE"
],
[
30,
33,
0,
29,
0,
"IMAGE"
],
[
31,
34,
0,
31,
0,
"IMAGE"
],
[
32,
11,
0,
21,
0,
"IMAGE"
],
[
33,
11,
0,
33,
0,
"IMAGE"
],
[
34,
11,
0,
34,
0,
"IMAGE"
],
[
47,
12,
0,
37,
0,
"CONTROL_NET"
],
[
48,
16,
0,
37,
1,
"IMAGE"
],
[
49,
23,
0,
38,
0,
"CONTROL_NET"
],
[
50,
21,
0,
38,
1,
"IMAGE"
],
[
51,
30,
0,
39,
0,
"CONTROL_NET"
],
[
52,
33,
0,
39,
1,
"IMAGE"
],
[
53,
32,
0,
40,
0,
"CONTROL_NET"
],
[
54,
34,
0,
40,
1,
"IMAGE"
],
[
55,
41,
0,
35,
1,
"CONTROL_NET_STACK"
],
[
56,
42,
0,
43,
0,
"MODEL"
],
[
57,
42,
1,
43,
1,
"CONDITIONING"
],
[
58,
42,
2,
43,
2,
"CONDITIONING"
],
[
59,
42,
3,
43,
3,
"LATENT"
],
[
60,
42,
4,
43,
4,
"VAE"
],
[
61,
43,
5,
44,
0,
"IMAGE"
],
[
62,
37,
0,
38,
2,
"CONTROL_NET_STACK"
],
[
63,
38,
0,
39,
2,
"CONTROL_NET_STACK"
],
[
64,
39,
0,
40,
2,
"CONTROL_NET_STACK"
],
[
65,
40,
0,
42,
1,
"CONTROL_NET_STACK"
]
],
"groups": [],
"config": {},
"extra": {
"0246.VERSION": [
0,
0,
4
]
},
"version": 0.4
}
测试图片