什么是 outpainting?
outpainting 是一种 向图像“外侧”继续扩画 的方法。
不过,它并不是什么特殊的生成方式。
只需在图像外侧特意加上空白,把空白作为掩膜进行 inpainting。
填补图像内部,还是填补外侧新增的空白。区别仅此而已。
如果还没有读过 inpainting,请先看一下。
inpainting 模型
先来看使用 inpainting 模型的方法。
工作流

{
"id": "8b9f7796-0873-4025-be3c-0f997f67f866",
"revision": 0,
"last_node_id": 27,
"last_link_id": 34,
"nodes": [
{
"id": 8,
"type": "VAEDecode",
"pos": [
1531.2999999999997,
212.20000000000002
],
"size": [
203.39999999999986,
46
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7
},
{
"name": "vae",
"type": "VAE",
"link": 10
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
9
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
416.1970166015625,
392.37848510742185
],
"size": [
410.75801513671877,
158.82607910156253
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
26
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark, worst quality"
]
},
{
"id": 10,
"type": "VAELoader",
"pos": [
595.4674284324961,
604.8385752753561
],
"size": [
231.48760330578511,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
10,
27
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"vae-ft-mse-840000-ema-pruned.safetensors"
]
},
{
"id": 20,
"type": "InpaintModelConditioning",
"pos": [
885.5197492645148,
229.90120706804433
],
"size": [
258.49395533092,
138
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 25
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 26
},
{
"name": "vae",
"type": "VAE",
"link": 27
},
{
"name": "pixels",
"type": "IMAGE",
"link": 32
},
{
"name": "mask",
"type": "MASK",
"link": 33
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
23
]
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
24
]
},
{
"name": "latent",
"type": "LATENT",
"links": [
28
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "InpaintModelConditioning"
},
"widgets_values": [
true
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 11,
"type": "LoadImage",
"pos": [
226.26940947344482,
716.2031266209856
],
"size": [
341.9935235795455,
473.93255454545454
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
31
]
},
{
"name": "MASK",
"type": "MASK",
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "LoadImage",
"image": "clipspace/clipspace-painted-masked-1765081230796.png [input]"
},
"widgets_values": [
"clipspace/clipspace-painted-masked-1765081230796.png [input]",
"image"
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415,
186
],
"size": [
411.95503173828126,
151.0030493164063
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
25
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"high quality, Image of a woman standing on the apartment balcony"
]
},
{
"id": 27,
"type": "PreviewImage",
"pos": [
858.7750911395705,
716.2031266209856
],
"size": [
380.2852272727273,
258
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 34
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 9,
"type": "SaveImage",
"pos": [
1773.2999999999997,
213.20000000000002
],
"size": [
582.2876035004722,
488.23967321788405
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 9
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 26,
"type": "ImagePadForOutpaint",
"pos": [
601.5550317382813,
716.2031266209856
],
"size": [
225.39999999999998,
174
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 31
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
32,
34
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
33
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "ImagePadForOutpaint"
},
"widgets_values": [
256,
0,
256,
0,
0
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 3,
"type": "KSampler",
"pos": [
1185.2999999999995,
210.20000000000002
],
"size": [
315,
262
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 23
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 24
},
{
"name": "latent_image",
"type": "LATENT",
"link": 28
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
7
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "KSampler"
},
"widgets_values": [
7777,
"fixed",
20,
8,
"euler",
"normal",
1
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
39.900463636363625,
349.9095500000008
],
"size": [
315,
98
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
1
]
},
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 1,
"links": [
3,
5
]
},
{
"name": "VAE",
"type": "VAE",
"slot_index": 2,
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"sd-v1-5-inpainting.ckpt"
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
1,
4,
0,
3,
0,
"MODEL"
],
[
3,
4,
1,
6,
0,
"CLIP"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
7,
3,
0,
8,
0,
"LATENT"
],
[
9,
8,
0,
9,
0,
"IMAGE"
],
[
10,
10,
0,
8,
1,
"VAE"
],
[
23,
20,
0,
3,
1,
"CONDITIONING"
],
[
24,
20,
1,
3,
2,
"CONDITIONING"
],
[
25,
6,
0,
20,
0,
"CONDITIONING"
],
[
26,
7,
0,
20,
1,
"CONDITIONING"
],
[
27,
10,
0,
20,
2,
"VAE"
],
[
28,
20,
2,
3,
3,
"LATENT"
],
[
31,
11,
0,
26,
0,
"IMAGE"
],
[
32,
26,
0,
20,
3,
"IMAGE"
],
[
33,
26,
1,
20,
4,
"MASK"
],
[
34,
26,
0,
27,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.7513148009015777,
"offset": [
60.099536363636375,
-86
]
},
"frontendVersion": "1.34.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- 🟦 使用
Pad Image for Outpainting节点,在图像外侧添加空白。- 它会输出添加空白后的图像,以及标出空白区域的掩膜。
- 🟩 后面的做法和 inpainting/inpainting 专用模型 相同。将图像和掩膜连接到
InpaintModelConditioning节点。
ControlNet inpaint
当然,也可以使用 ControlNet inpaint。
工作流

{
"id": "8b9f7796-0873-4025-be3c-0f997f67f866",
"revision": 0,
"last_node_id": 32,
"last_link_id": 59,
"nodes": [
{
"id": 8,
"type": "VAEDecode",
"pos": [
1515.2999999999997,
213.20000000000002
],
"size": [
203.39999999999986,
46
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7
},
{
"name": "vae",
"type": "VAE",
"link": 10
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
9
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
420.98808709870343,
387.97848510742176
],
"size": [
410.75801513671877,
158.82607910156253
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
33
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark, worst quality"
]
},
{
"id": 26,
"type": "ControlNetLoader",
"pos": [
573.8122179379016,
601.5646590492796
],
"size": [
257.93388429752065,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
39
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"control_v11p_sd15_inpaint_fp16.safetensors"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 24,
"type": "InpaintPreprocessor",
"pos": [
593.6777428604222,
728.2127272727273
],
"size": [
238.068359375,
78
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 54
},
{
"name": "mask",
"type": "MASK",
"link": 56
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
31
]
}
],
"properties": {
"cnr_id": "comfyui_controlnet_aux",
"ver": "12f35647f0d510e03b45a47fb420fe1245a575df",
"Node name for S&R": "InpaintPreprocessor"
},
"widgets_values": [
false
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 10,
"type": "VAELoader",
"pos": [
395.1303171114555,
1012.947966184447
],
"size": [
231.48760330578511,
58
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
10,
34,
41
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"vae-ft-mse-840000-ema-pruned.safetensors"
]
},
{
"id": 27,
"type": "VAEEncode",
"pos": [
486.7770161500693,
868.15734837917
],
"size": [
140,
46
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 55
},
{
"name": "vae",
"type": "VAE",
"link": 41
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
51
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "VAEEncode"
},
"widgets_values": [],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 30,
"type": "SetLatentNoiseMask",
"pos": [
654.6523241448506,
916.4969147623518
],
"size": [
180.74765625,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 51
},
{
"name": "mask",
"type": "MASK",
"link": 57
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
53
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": [],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
59.95686363636362,
333.7249500000008
],
"size": [
315,
98
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
1
]
},
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 1,
"links": [
3,
5
]
},
{
"name": "VAE",
"type": "VAE",
"slot_index": 2,
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"v1-5-pruned-emaonly-fp16.safetensors"
]
},
{
"id": 11,
"type": "LoadImage",
"pos": [
-239.93006446959242,
924.8215199098424
],
"size": [
341.9935235795455,
473.93255454545454
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
58
]
},
{
"name": "MASK",
"type": "MASK",
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "LoadImage",
"image": "clipspace/clipspace-painted-masked-1765081942036.png [input]"
},
"widgets_values": [
"clipspace/clipspace-painted-masked-1765081942036.png [input]",
"image"
]
},
{
"id": 31,
"type": "ImagePadForOutpaint",
"pos": [
132.00558162131637,
923.108392455297
],
"size": [
225.39999999999998,
174
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 58
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
54,
55,
59
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
56,
57
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "ImagePadForOutpaint"
},
"widgets_values": [
256,
0,
256,
0,
0
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 32,
"type": "PreviewImage",
"pos": [
395.1303171114555,
1130.8762450330573
],
"size": [
342.47933884297515,
258
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 59
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
419.79107049714094,
181.60000000000002
],
"size": [
411.95503173828126,
151.0030493164063
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
32
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"high quality, Image of a woman standing on the apartment balcony"
]
},
{
"id": 3,
"type": "KSampler",
"pos": [
1169.2999999999995,
211.20000000000002
],
"size": [
315,
262
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 37
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 38
},
{
"name": "latent_image",
"type": "LATENT",
"link": 53
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
7
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "KSampler"
},
"widgets_values": [
7777,
"fixed",
20,
8,
"euler",
"normal",
1
]
},
{
"id": 22,
"type": "ControlNetApplyAdvanced",
"pos": [
901.0437048084135,
232.48767017280198
],
"size": [
235.54470323065357,
186
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 32
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 33
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 39
},
{
"name": "image",
"type": "IMAGE",
"link": 31
},
{
"name": "vae",
"shape": 7,
"type": "VAE",
"link": 34
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
37
]
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
38
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.76",
"Node name for S&R": "ControlNetApplyAdvanced"
},
"widgets_values": [
1,
0,
1
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 9,
"type": "SaveImage",
"pos": [
1757.2999999999997,
214.20000000000002
],
"size": [
550.1388035004722,
456.18347321788383
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 9
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"ComfyUI"
]
}
],
"links": [
[
1,
4,
0,
3,
0,
"MODEL"
],
[
3,
4,
1,
6,
0,
"CLIP"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
7,
3,
0,
8,
0,
"LATENT"
],
[
9,
8,
0,
9,
0,
"IMAGE"
],
[
10,
10,
0,
8,
1,
"VAE"
],
[
31,
24,
0,
22,
3,
"IMAGE"
],
[
32,
6,
0,
22,
0,
"CONDITIONING"
],
[
33,
7,
0,
22,
1,
"CONDITIONING"
],
[
34,
10,
0,
22,
4,
"VAE"
],
[
37,
22,
0,
3,
1,
"CONDITIONING"
],
[
38,
22,
1,
3,
2,
"CONDITIONING"
],
[
39,
26,
0,
22,
2,
"CONTROL_NET"
],
[
41,
10,
0,
27,
1,
"VAE"
],
[
51,
27,
0,
30,
0,
"LATENT"
],
[
53,
30,
0,
3,
3,
"LATENT"
],
[
54,
31,
0,
24,
0,
"IMAGE"
],
[
55,
31,
0,
27,
0,
"IMAGE"
],
[
56,
31,
1,
24,
1,
"MASK"
],
[
57,
31,
1,
30,
1,
"MASK"
],
[
58,
11,
0,
31,
0,
"IMAGE"
],
[
59,
31,
0,
32,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909094,
"offset": [
339.9300644695924,
-81.60000000000002
]
},
"frontendVersion": "1.34.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- 🟦 使用
Pad Image for Outpainting节点,在图像外侧添加空白。- 它会输出添加空白后的图像,以及标出空白区域的掩膜。
- 🟨 后面的做法和 inpainting/ControlNet inpaint 相同。将图像和掩膜传给 ControlNet inpaint 的预处理节点。
图像编辑模型
使用图像编辑模型会更简单。
在图像外侧加上灰色区域(其实什么颜色都可以),然后把图像交给图像编辑模型。接下来只要用提示词告诉它“自然地 outpaint 灰色区域”即可。
FLUX.2 [klein]
来试试 FLUX.2 [klein] 9B。

{
"id": "0613b710-fadb-4f72-9aff-d02126893c5a",
"revision": 0,
"last_node_id": 72,
"last_link_id": 114,
"nodes": [
{
"id": 51,
"type": "ResizeImageMaskNode",
"pos": [
210.9172345510862,
484.74016932307575
],
"size": [
270,
106
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 108
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
82
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"scale total pixels",
1,
"nearest-exact"
],
"widgets_values_named": {
"resize_type": "scale total pixels",
"resize_type.megapixels": 1,
"scale_method": "nearest-exact"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 49,
"type": "ReferenceLatent",
"pos": [
1021.2781285510225,
160.40068341159756
],
"size": [
204.134765625,
46
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 70
},
{
"name": "latent",
"shape": 7,
"type": "LATENT",
"link": 75
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
71
]
}
],
"properties": {
"Node name for S&R": "ReferenceLatent",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 43,
"type": "VAELoader",
"pos": [
517.231573621917,
656.7863480776692
],
"size": [
269.8313103058076,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
62,
76
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
"flux2-vae.safetensors"
],
"widgets_values_named": {
"vae_name": "flux2-vae.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 31,
"type": "KSampler",
"pos": [
1262.7259909887628,
160.40068341159756
],
"size": [
315,
262
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 69
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 71
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 86
},
{
"name": "latent_image",
"type": "LATENT",
"link": 74
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
52
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
1234,
"fixed",
4,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 1234,
"control_after_generate": "fixed",
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 52,
"type": "VAEEncode",
"pos": [
821.9650317382823,
484.74016932307575
],
"size": [
162,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 80
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
74,
75
]
}
],
"properties": {
"Node name for S&R": "VAEEncode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 54,
"type": "ResizeImageMaskNode",
"pos": [
516.4411331446843,
484.74016932307575
],
"size": [
270,
106
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 82
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
80
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"scale to multiple",
16,
"nearest-exact"
],
"widgets_values_named": {
"resize_type": "scale to multiple",
"resize_type.multiple": 16,
"scale_method": "nearest-exact"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1615.039087801503,
160.40068341159756
],
"size": [
161.111083984375,
46
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 52
},
{
"name": "vae",
"type": "VAE",
"link": 62
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
65
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.39"
}
},
{
"id": 48,
"type": "UNETLoader",
"pos": [
917.2536154382312,
19.495025634765582
],
"size": [
308.1592787377913,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
69
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"flux-2-klein-9b-fp8.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "flux-2-klein-9b-fp8.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 50,
"type": "LoadImage",
"pos": [
-396.5211876361099,
484.74016932307575
],
"size": [
296.798828125,
458.0000000000001
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
107
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"Image_fx (2).jpg",
"image"
],
"widgets_values_named": {
"image": "Image_fx (2).jpg",
"upload": "image"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
558.700000000001,
160.40068341159756
],
"size": [
425.2650317382812,
167.9430462646484
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 63
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
70
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
"Outpaint the gray areas to extend the scene naturally"
],
"widgets_values_named": {
"text": "Outpaint the gray areas to extend the scene naturally"
}
},
{
"id": 67,
"type": "ImagePadForOutpaint",
"pos": [
-64.19846091751185,
484.74016932307575
],
"size": [
239.591796875,
174
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 107
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
108,
114
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "ImagePadForOutpaint"
},
"widgets_values": [
104,
200,
200,
0,
40
],
"widgets_values_named": {
"left": 104,
"top": 200,
"right": 200,
"bottom": 0,
"feathering": 40
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 72,
"type": "PreviewImage",
"pos": [
210.9172345510862,
656.7863480776692
],
"size": [
271.81817626953125,
338.727294921875
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 114
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 33,
"type": "CLIPTextEncode",
"pos": [
558.700000000001,
387.24938745307793
],
"size": [
425.2650317382812,
122.99611236572264
],
"flags": {
"collapsed": true
},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 64
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
86
]
}
],
"title": "CLIP Text Encode (Negative Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
""
],
"widgets_values_named": {
"text": ""
}
},
{
"id": 44,
"type": "CLIPLoader",
"pos": [
224.49879211425772,
292.66704483032197
],
"size": [
283.80000000000007,
106
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [
63,
64
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.73"
},
"widgets_values": [
"qwen_3_8b.safetensors",
"flux2",
"default"
],
"widgets_values_named": {
"clip_name": "qwen_3_8b.safetensors",
"type": "flux2",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 45,
"type": "SaveImage",
"pos": [
1813.4632685986182,
160.40068341159756
],
"size": [
587.0799865722656,
731.3289395751952
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 65
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73"
},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
}
],
"links": [
[
52,
31,
0,
8,
0,
"LATENT"
],
[
62,
43,
0,
8,
1,
"VAE"
],
[
63,
44,
0,
6,
0,
"CLIP"
],
[
64,
44,
0,
33,
0,
"CLIP"
],
[
65,
8,
0,
45,
0,
"IMAGE"
],
[
69,
48,
0,
31,
0,
"MODEL"
],
[
70,
6,
0,
49,
0,
"CONDITIONING"
],
[
71,
49,
0,
31,
1,
"CONDITIONING"
],
[
74,
52,
0,
31,
3,
"LATENT"
],
[
75,
52,
0,
49,
1,
"LATENT"
],
[
76,
43,
0,
52,
1,
"VAE"
],
[
80,
54,
0,
52,
0,
"IMAGE"
],
[
82,
51,
0,
54,
0,
"IMAGE"
],
[
86,
33,
0,
31,
2,
"CONDITIONING"
],
[
107,
50,
0,
67,
0,
"IMAGE"
],
[
108,
67,
0,
51,
0,
"IMAGE"
],
[
114,
67,
0,
72,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.5131581182307069,
"offset": [
690.5488435213136,
400.61761623956596
]
},
"frontendVersion": "1.49.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- 🟩 不使用掩膜。只需把添加了空白的图像交给模型,并告诉它填补那片区域。