GGUF モデルを読み込んだFlux.1 fill dev Outpainting複数画像対応ComfyUIワークフロー
はじめに

Stable Diffusionで、Outpainting mk2またはPoor man’s outpaintingを使用できますが滑らかに対応できません。そこで次のように対応します
Poor man’s outpainting

FLUX

Flux Fill ワークフロー ステップバイステップガイド | ComfyUI Wiki
このComfyUIワークフローは、inpainting(画像の一部を補完)とoutpainting(画像の外側を拡張)を組み合わせた画像生成フローです。GGUF モデルを読み込みとフォルダーにある画像を読み込む機能とランダムシートを使用する機能追加。以下に、主要なノードの役割と接続関係をわかりやすく説明
🌟全体の流れ
- CLIPとテキストから条件付けを生成
- 画像とマスクを読み込み、拡張(outpaint)
- モデルとVAEをロード
- 条件付けと画像を使ってinpainting処理
- 生成画像を保存
🌟 使用されているモデル名とノード配置
| モデルの種類 | ノード名 | モデルファイル名 | ノードID | |
|---|---|---|---|---|
| テキストエンコーダー(CLIP) | DualCLIPLoader | clip_l.safetensors, t5xxl_fp8_e4m3fn_scaled.safetensors | 34 | E:\EasyWan22\Model\clip |
| VAE(潜在空間復元) | VAELoader | ae.safetensors | 32 | E:\EasyWan22\Model\vae |
| GGUFモデル(推論用) | LoaderGGUF | flux1-fill-dev-Q4_K_S.gguf | 45 | E:\EasyWan22\Model\diffusion_models |
🔄 モデルの流れ
- LoaderGGUF (ID: 45) で
flux1-fill-dev-Q4_K_S.ggufを読み込み。 - それが DifferentialDiffusion (ID: 39) に渡されて、KSampler (ID: 3) に接続。
- テキストプロンプトは DualCLIPLoader (ID: 34) → CLIPTextEncode (ID: 23, 7) → FluxGuidance (ID: 26) → InpaintModelConditioning (ID: 38) に流れる。
- VAEは VAELoader (ID: 32) → InpaintModelConditioning (ID: 38) → VAEDecode (ID: 8) で画像生成に使われる。
🧠ノードと接続の詳細
① テキストエンコード(プロンプト)
- Node 23: CLIPTextEncode (Positive Prompt)
- 入力:
clip(Node 34から) - 出力:
CONDITIONING→ Node 26へ
- 入力:
- Node 7: CLIPTextEncode (Negative Prompt)
- 入力:
clip(Node 34から) - 出力:
CONDITIONING→ Node 38へ
- 入力:
- Node 34: DualCLIPLoader
- 出力:
CLIP→ Node 23とNode 7へ
- 出力:
② ガイダンス調整
- Node 26: FluxGuidance
- 入力: Positive条件(Node 23)
- 出力: 調整済みCONDITIONING → Node 38へ
- guidance値:
30
③ モデルとVAEの準備
- Node 45: LoaderGGUF
- モデルロード → Node 39へ
- Node 39: DifferentialDiffusion
- モデル変換 → Node 3へ
- Node 32: VAELoader
- VAEロード → Node 8とNode 38へ
④ 画像とマスクの準備
- Node 53: LoadImageSetFromFolderNode
- フォルダから画像読み込み → Node 44へ
- Node 44: ImagePadForOutpaint
- 入力: 画像(Node 53)
- 出力: 拡張画像とマスク → Node 38へ
⑤ Inpainting条件生成
- Node 38: InpaintModelConditioning
- 入力:
- Positive(Node 26)
- Negative(Node 7)
- VAE(Node 32)
- 画像(Node 44)
- マスク(Node 44)
- 出力:
- Positive → Node 3
- Negative → Node 3
- Latent → Node 3
- 入力:
⑥ 画像生成とデコード
- Node 58: Seed (rgthree)
- 出力: シード値 → Node 3へ
- Node 3: KSampler
- 入力: モデル、条件付け、潜在画像、シードなど
- 出力: 潜在画像 → Node 8へ
- Node 8: VAEDecode
- 入力: 潜在画像(Node 3)、VAE(Node 32)
- 出力: 画像 → Node 9へ
⑦ 画像保存
- Node 9: SaveImage
- 入力: 画像(Node 8)
- 保存ファイル名:
%date:yyyy-MM-dd%/%date:MMdd_hhmmss%_Generated
💡補足
- Node 17 は画像アップロード用だけど、今回は未接続。
- Node 57 はターゲットサイズ指定のoutpaintノードだけど、こちらも未接続。
ワークフロー
1枚の画像やサイズを指定しての拡大アウトペインティングは接続先を変更して対応してください
{
"config":
{
},
"extra":
{
"ds":
{
"offset":
[
-414.222536954013,
154.190865873086
],
"scale": 1.1
}
},
"groups":
[
],
"id": "6cc0d896-ced6-4635-807b-35d4fdb6b896",
"last_link_id": 115,
"last_node_id": 58,
"links":
[
[
7,
3,
0,
8,
0,
"LATENT"
],
[
41,
23,
0,
26,
0,
"CONDITIONING"
],
[
60,
32,
0,
8,
1,
"VAE"
],
[
62,
34,
0,
23,
0,
"CLIP"
],
[
63,
34,
0,
7,
0,
"CLIP"
],
[
77,
38,
0,
3,
1,
"CONDITIONING"
],
[
78,
38,
1,
3,
2,
"CONDITIONING"
],
[
80,
26,
0,
38,
0,
"CONDITIONING"
],
[
81,
7,
0,
38,
1,
"CONDITIONING"
],
[
82,
32,
0,
38,
2,
"VAE"
],
[
86,
39,
0,
3,
0,
"MODEL"
],
[
88,
38,
2,
3,
3,
"LATENT"
],
[
95,
8,
0,
9,
0,
"IMAGE"
],
[
97,
44,
0,
38,
3,
"IMAGE"
],
[
98,
44,
1,
38,
4,
"MASK"
],
[
99,
45,
0,
39,
0,
"MODEL"
],
[
114,
53,
0,
44,
0,
"IMAGE"
],
[
115,
58,
0,
3,
4,
"INT"
]
],
"nodes":
[
{
"bgcolor": "#533",
"color": "#322",
"flags":
{
"collapsed": true
},
"id": 7,
"inputs":
[
{
"link": 63,
"localized_name": "\u30af\u30ea\u30c3\u30d7",
"name": "clip",
"type": "CLIP"
},
{
"link": null,
"localized_name": "\u30c6\u30ad\u30b9\u30c8",
"name": "text",
"type": "STRING",
"widget":
{
"name": "text"
}
}
],
"mode": 0,
"order": 8,
"outputs":
[
{
"links":
[
81
],
"localized_name": "\u6761\u4ef6\u4ed8\u3051",
"name": "CONDITIONING",
"slot_index": 0,
"type": "CONDITIONING"
}
],
"pos":
[
515,
424.313049316406
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "CLIPTextEncode",
"ver": "0.3.55"
},
"size":
[
425.278015136719,
180.606079101563
],
"title": "CLIP Text Encode (Negative Prompt)",
"type": "CLIPTextEncode",
"widgets_values":
[
""
]
},
{
"flags":
{
},
"id": 26,
"inputs":
[
{
"link": 41,
"localized_name": "\u30b3\u30f3\u30c7\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0",
"name": "conditioning",
"type": "CONDITIONING"
},
{
"link": null,
"localized_name": "\u30ac\u30a4\u30c0\u30f3\u30b9",
"name": "guidance",
"type": "FLOAT",
"widget":
{
"name": "guidance"
}
}
],
"mode": 0,
"order": 11,
"outputs":
[
{
"links":
[
80
],
"localized_name": "\u6761\u4ef6\u4ed8\u3051",
"name": "CONDITIONING",
"slot_index": 0,
"type": "CONDITIONING"
}
],
"pos":
[
1040.27807617188,
130
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "FluxGuidance",
"ver": "0.3.55"
},
"size":
[
317.400024414063,
58
],
"type": "FluxGuidance",
"widgets_values":
[
30
]
},
{
"flags":
{
},
"id": 38,
"inputs":
[
{
"link": 80,
"localized_name": "\u30dd\u30b8\u30c6\u30a3\u30d6",
"name": "positive",
"type": "CONDITIONING"
},
{
"link": 81,
"localized_name": "\u30cd\u30ac\u30c6\u30a3\u30d6",
"name": "negative",
"type": "CONDITIONING"
},
{
"link": 82,
"localized_name": "vae",
"name": "vae",
"type": "VAE"
},
{
"link": 97,
"localized_name": "\u30d4\u30af\u30bb\u30eb",
"name": "pixels",
"type": "IMAGE"
},
{
"link": 98,
"localized_name": "\u30de\u30b9\u30af",
"name": "mask",
"type": "MASK"
},
{
"link": null,
"localized_name": "\u30ce\u30a4\u30ba\u30de\u30b9\u30af",
"name": "noise_mask",
"type": "BOOLEAN",
"widget":
{
"name": "noise_mask"
}
}
],
"mode": 0,
"order": 12,
"outputs":
[
{
"links":
[
77
],
"localized_name": "\u30dd\u30b8\u30c6\u30a3\u30d6",
"name": "positive",
"slot_index": 0,
"type": "CONDITIONING"
},
{
"links":
[
78
],
"localized_name": "\u30cd\u30ac\u30c6\u30a3\u30d6",
"name": "negative",
"slot_index": 1,
"type": "CONDITIONING"
},
{
"links":
[
88
],
"localized_name": "\u6f5c\u5728",
"name": "latent",
"slot_index": 2,
"type": "LATENT"
}
],
"pos":
[
1457.67797851563,
130
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "InpaintModelConditioning",
"ver": "0.3.55"
},
"size":
[
302.400024414063,
138
],
"type": "InpaintModelConditioning",
"widgets_values":
[
false
]
},
{
"flags":
{
},
"id": 34,
"inputs":
[
{
"link": null,
"localized_name": "clip_name1",
"name": "clip_name1",
"type": "COMBO",
"widget":
{
"name": "clip_name1"
}
},
{
"link": null,
"localized_name": "clip_name2",
"name": "clip_name2",
"type": "COMBO",
"widget":
{
"name": "clip_name2"
}
},
{
"link": null,
"localized_name": "\u30bf\u30a4\u30d7",
"name": "type",
"type": "COMBO",
"widget":
{
"name": "type"
}
},
{
"link": null,
"localized_name": "\u30c7\u30d0\u30a4\u30b9",
"name": "device",
"shape": 7,
"type": "COMBO",
"widget":
{
"name": "device"
}
}
],
"mode": 0,
"order": 0,
"outputs":
[
{
"links":
[
62,
63
],
"localized_name": "CLIP",
"name": "CLIP",
"type": "CLIP"
}
],
"pos":
[
100,
318
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "DualCLIPLoader",
"ver": "0.3.55"
},
"size":
[
315,
130
],
"type": "DualCLIPLoader",
"widgets_values":
[
"clip_l.safetensors",
"t5xxl_fp8_e4m3fn_scaled.safetensors",
"flux",
"default"
]
},
{
"bgcolor": "#353",
"color": "#232",
"flags":
{
},
"id": 23,
"inputs":
[
{
"link": 62,
"localized_name": "\u30af\u30ea\u30c3\u30d7",
"name": "clip",
"type": "CLIP"
},
{
"link": null,
"localized_name": "\u30c6\u30ad\u30b9\u30c8",
"name": "text",
"type": "STRING",
"widget":
{
"name": "text"
}
}
],
"mode": 0,
"order": 7,
"outputs":
[
{
"links":
[
41
],
"localized_name": "\u6761\u4ef6\u4ed8\u3051",
"name": "CONDITIONING",
"slot_index": 0,
"type": "CONDITIONING"
}
],
"pos":
[
515,
130
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "CLIPTextEncode",
"ver": "0.3.55"
},
"size":
[
422.845031738281,
164.313049316406
],
"title": "CLIP Text Encode (Positive Prompt)",
"type": "CLIPTextEncode",
"widgets_values":
[
""
]
},
{
"flags":
{
},
"id": 9,
"inputs":
[
{
"link": 95,
"localized_name": "\u753b\u50cf",
"name": "images",
"type": "IMAGE"
},
{
"link": null,
"localized_name": "\u30d5\u30a1\u30a4\u30eb\u540d_\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9",
"name": "filename_prefix",
"type": "STRING",
"widget":
{
"name": "filename_prefix"
}
}
],
"mode": 0,
"order": 15,
"outputs":
[
],
"pos":
[
1602.41223144531,
571.333435058594
],
"properties":
{
"cnr_id": "comfy-core",
"ver": "0.3.55"
},
"size":
[
578.286926269531,
623.180908203125
],
"type": "SaveImage",
"widgets_values":
[
"%date:yyyy-MM-dd%/%date:MMdd_hhmmss%_Generated"
]
},
{
"flags":
{
},
"id": 3,
"inputs":
[
{
"link": 86,
"localized_name": "\u30e2\u30c7\u30eb",
"name": "model",
"type": "MODEL"
},
{
"link": 77,
"localized_name": "\u30dd\u30b8\u30c6\u30a3\u30d6",
"name": "positive",
"type": "CONDITIONING"
},
{
"link": 78,
"localized_name": "\u30cd\u30ac\u30c6\u30a3\u30d6",
"name": "negative",
"type": "CONDITIONING"
},
{
"link": 88,
"localized_name": "\u6f5c\u5728\u753b\u50cf",
"name": "latent_image",
"type": "LATENT"
},
{
"link": 115,
"localized_name": "\u30b7\u30fc\u30c9",
"name": "seed",
"type": "INT",
"widget":
{
"name": "seed"
}
},
{
"link": null,
"localized_name": "\u30b9\u30c6\u30c3\u30d7",
"name": "steps",
"type": "INT",
"widget":
{
"name": "steps"
}
},
{
"link": null,
"localized_name": "cfg",
"name": "cfg",
"type": "FLOAT",
"widget":
{
"name": "cfg"
}
},
{
"link": null,
"localized_name": "\u30b5\u30f3\u30d7\u30e9\u30fc\u540d",
"name": "sampler_name",
"type": "COMBO",
"widget":
{
"name": "sampler_name"
}
},
{
"link": null,
"localized_name": "\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9",
"name": "scheduler",
"type": "COMBO",
"widget":
{
"name": "scheduler"
}
},
{
"link": null,
"localized_name": "\u30ce\u30a4\u30ba\u9664\u53bb",
"name": "denoise",
"type": "FLOAT",
"widget":
{
"name": "denoise"
}
}
],
"mode": 0,
"order": 13,
"outputs":
[
{
"links":
[
7
],
"localized_name": "\u6f5c\u5728",
"name": "LATENT",
"slot_index": 0,
"type": "LATENT"
}
],
"pos":
[
1860.078125,
130
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "KSampler",
"ver": "0.3.55"
},
"size":
[
315,
262
],
"type": "KSampler",
"widgets_values":
[
45425332847555,
"randomize",
20,
1,
"euler",
"normal",
1
]
},
{
"flags":
{
},
"id": 8,
"inputs":
[
{
"link": 7,
"localized_name": "\u30b5\u30f3\u30d7\u30eb",
"name": "samples",
"type": "LATENT"
},
{
"link": 60,
"localized_name": "vae",
"name": "vae",
"type": "VAE"
}
],
"mode": 0,
"order": 14,
"outputs":
[
{
"links":
[
95
],
"localized_name": "\u753b\u50cf",
"name": "IMAGE",
"slot_index": 0,
"type": "IMAGE"
}
],
"pos":
[
1464.41162109375,
439.333312988281
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "VAEDecode",
"ver": "0.3.55"
},
"size":
[
210,
46
],
"type": "VAEDecode",
"widgets_values":
[
]
},
{
"flags":
{
},
"id": 32,
"inputs":
[
{
"link": null,
"localized_name": "vae_name",
"name": "vae_name",
"type": "COMBO",
"widget":
{
"name": "vae_name"
}
}
],
"mode": 0,
"order": 1,
"outputs":
[
{
"links":
[
60,
82
],
"localized_name": "VAE",
"name": "VAE",
"slot_index": 0,
"type": "VAE"
}
],
"pos":
[
1044,
262
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "VAELoader",
"ver": "0.3.55"
},
"size":
[
315,
58
],
"type": "VAELoader",
"widgets_values":
[
"ae.safetensors"
]
},
{
"flags":
{
},
"id": 17,
"inputs":
[
{
"link": null,
"localized_name": "\u753b\u50cf",
"name": "image",
"type": "COMBO",
"widget":
{
"name": "image"
}
},
{
"link": null,
"localized_name": "\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e",
"name": "upload",
"type": "IMAGEUPLOAD",
"widget":
{
"name": "upload"
}
}
],
"mode": 2,
"order": 2,
"outputs":
[
{
"links":
[
],
"localized_name": "\u753b\u50cf",
"name": "IMAGE",
"slot_index": 0,
"type": "IMAGE"
},
{
"links":
[
],
"localized_name": "\u30de\u30b9\u30af",
"name": "MASK",
"slot_index": 1,
"type": "MASK"
}
],
"pos":
[
129.333435058594,
690.000061035156
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "LoadImage",
"ver": "0.3.55"
},
"size":
[
315,
314.000030517578
],
"type": "LoadImage",
"widgets_values":
[
"example.png",
"image"
]
},
{
"flags":
{
},
"id": 44,
"inputs":
[
{
"link": 114,
"localized_name": "\u753b\u50cf",
"name": "image",
"type": "IMAGE"
},
{
"link": null,
"localized_name": "\u5de6",
"name": "left",
"type": "INT",
"widget":
{
"name": "left"
}
},
{
"link": null,
"localized_name": "\u4e0a",
"name": "top",
"type": "INT",
"widget":
{
"name": "top"
}
},
{
"link": null,
"localized_name": "\u53f3",
"name": "right",
"type": "INT",
"widget":
{
"name": "right"
}
},
{
"link": null,
"localized_name": "\u4e0b",
"name": "bottom",
"type": "INT",
"widget":
{
"name": "bottom"
}
},
{
"link": null,
"localized_name": "\u30d5\u30a7\u30b6\u30ea\u30f3\u30b0",
"name": "feathering",
"type": "INT",
"widget":
{
"name": "feathering"
}
}
],
"mode": 0,
"order": 9,
"outputs":
[
{
"links":
[
97
],
"localized_name": "\u753b\u50cf",
"name": "IMAGE",
"slot_index": 0,
"type": "IMAGE"
},
{
"links":
[
98
],
"localized_name": "\u30de\u30b9\u30af",
"name": "MASK",
"slot_index": 1,
"type": "MASK"
}
],
"pos":
[
1055,
384.252502441406
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "ImagePadForOutpaint",
"ver": "0.3.55"
},
"size":
[
315,
174
],
"type": "ImagePadForOutpaint",
"widgets_values":
[
256,
256,
256,
0,
24
]
},
{
"flags":
{
},
"id": 53,
"inputs":
[
{
"link": null,
"localized_name": "folder",
"name": "folder",
"type": "COMBO",
"widget":
{
"name": "folder"
}
},
{
"link": null,
"localized_name": "resize_method",
"name": "resize_method",
"shape": 7,
"type": "COMBO",
"widget":
{
"name": "resize_method"
}
}
],
"mode": 0,
"order": 3,
"outputs":
[
{
"links":
[
114
],
"localized_name": "\u753b\u50cf",
"name": "IMAGE",
"type": "IMAGE"
}
],
"pos":
[
148.942626953125,
516.386352539063
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "LoadImageSetFromFolderNode",
"ver": "0.3.55"
},
"size":
[
301.443939208984,
82
],
"type": "LoadImageSetFromFolderNode",
"widgets_values":
[
"Load",
"None"
]
},
{
"flags":
{
},
"id": 39,
"inputs":
[
{
"link": 99,
"localized_name": "\u30e2\u30c7\u30eb",
"name": "model",
"type": "MODEL"
}
],
"mode": 0,
"order": 10,
"outputs":
[
{
"links":
[
86
],
"localized_name": "\u30e2\u30c7\u30eb",
"name": "MODEL",
"slot_index": 0,
"type": "MODEL"
}
],
"pos":
[
1086.63610839844,
813.706665039063
],
"properties":
{
"cnr_id": "comfy-core",
"Node name for S&R": "DifferentialDiffusion",
"ver": "0.3.55"
},
"size":
[
277.200012207031,
26
],
"type": "DifferentialDiffusion",
"widgets_values":
[
]
},
{
"flags":
{
},
"id": 57,
"inputs":
[
{
"link": null,
"localized_name": "image",
"name": "image",
"type": "IMAGE"
},
{
"link": null,
"localized_name": "mask",
"name": "mask",
"shape": 7,
"type": "MASK"
},
{
"link": null,
"localized_name": "target_width",
"name": "target_width",
"type": "INT",
"widget":
{
"name": "target_width"
}
},
{
"link": null,
"localized_name": "target_height",
"name": "target_height",
"type": "INT",
"widget":
{
"name": "target_height"
}
},
{
"link": null,
"localized_name": "feathering",
"name": "feathering",
"type": "INT",
"widget":
{
"name": "feathering"
}
},
{
"link": null,
"localized_name": "upscale_method",
"name": "upscale_method",
"type": "COMBO",
"widget":
{
"name": "upscale_method"
}
}
],
"mode": 0,
"order": 4,
"outputs":
[
{
"links": null,
"localized_name": "\u753b\u50cf",
"name": "IMAGE",
"type": "IMAGE"
},
{
"links": null,
"localized_name": "\u30de\u30b9\u30af",
"name": "MASK",
"type": "MASK"
}
],
"pos":
[
1055.69030761719,
607.214477539063
],
"properties":
{
"cnr_id": "comfyui-kjnodes",
"Node name for S&R": "ImagePadForOutpaintTargetSize",
"ver": "e81f33508b0821ea2f53f4f46a833fa6215626bd"
},
"size":
[
323.236907958984,
150
],
"type": "ImagePadForOutpaintTargetSize",
"widgets_values":
[
0,
0,
0,
"nearest-exact"
]
},
{
"flags":
{
},
"id": 45,
"inputs":
[
{
"link": null,
"localized_name": "gguf_name",
"name": "gguf_name",
"type": "COMBO",
"widget":
{
"name": "gguf_name"
}
}
],
"mode": 0,
"order": 5,
"outputs":
[
{
"links":
[
99
],
"localized_name": "\u30e2\u30c7\u30eb",
"name": "MODEL",
"type": "MODEL"
}
],
"pos":
[
580.577758789063,
765.553833007813
],
"properties":
{
"cnr_id": "gguf",
"Node name for S&R": "LoaderGGUF",
"ver": "2.6.5"
},
"size":
[
270,
58
],
"type": "LoaderGGUF",
"widgets_values":
[
"flux1-fill-dev-Q4_K_S.gguf"
]
},
{
"flags":
{
},
"id": 58,
"inputs":
[
],
"mode": 0,
"order": 6,
"outputs":
[
{
"dir": 4,
"links":
[
115
],
"name": "SEED",
"shape": 3,
"type": "INT"
}
],
"pos":
[
1460.28356933594,
-67.5241470336914
],
"properties":
{
"cnr_id": "rgthree-comfy",
"randomMax": 1125899906842624,
"randomMin": 0,
"ver": "0fb1e239a903e93ef626a8c20589b38f46e39dff"
},
"size":
[
315,
130
],
"type": "Seed (rgthree)",
"widgets_values":
[
-1,
"",
"",
""
]
}
],
"revision": 0,
"version": 0.4
}







ディスカッション
コメント一覧
まだ、コメントがありません