ComfyPilotComfyPilot
工作流 / 图像 / Ideogram 4.5 精准编辑
Ideogram 4.5 精准编辑

Ideogram 4.5 精准编辑

Ideogram 4.5 Precise Edit

使用 Ideogram 4.5,根据提示词和最多五张输入图像生成一张精确编辑的图像,其中图像 1 是要编辑的图像,图像 2-5 是可选参考。只有提示词要求的内容会发生变化,因此未触及的像素保持完全一致,输出保持图像 1 的尺寸,并可选择质量层级。非常适合产品换色和材质替换、在不影响照片光照、背景或构图的情况下替换其中一个元素,以及必须保持图像其余部分不变的修饰。

图像 10 个节点 1 个输入 145 次使用 ComfyUI ≥ 0.43.2 ComfyUI 13 KB

下载工作流 JSON 查看官方来源

下载后把文件拖进 ComfyUI 窗口即可打开。

节点构成

MarkdownNote × 3
LoadImage × 1
BuildJsonPromptIdeogram × 1
CreateBoundingBoxes × 1
PreviewAny × 1
SaveImageAdvanced × 1
ImageCompare × 1
IdeogramPreciseEditApi × 1

官方标注的模型

Ideogram

工作流 JSON

和上面「下载工作流 JSON」是同一份文件。

1{
2 "id": "b9a4879b-6e6a-4acb-a0c0-b4f8375f608c",
3 "revision": 0,
4 "last_node_id": 21,
5 "last_link_id": 27,
6 "nodes": [
7 {
8 "id": 2,
9 "type": "LoadImage",
10 "pos": [
11 -670,
12 630
13 ],
14 "size": [
15 390,
16 720
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 21,
28 23,
29 24
30 ]
31 },
32 {
33 "name": "MASK",
34 "type": "MASK",
35 "links": null
36 }
37 ],
38 "properties": {
39 "Node name for S&R": "LoadImage"
40 },
41 "widgets_values": [
42 "redhair_girl_portrait.png",
43 "image"
44 ],
45 "widgets_values_named": {
46 "image": "redhair_girl_portrait.png",
47 "upload": "image"
48 }
49 },
50 {
51 "id": 3,
52 "type": "BuildJsonPromptIdeogram",
53 "pos": [
54 310,
55 760
56 ],
57 "size": [
58 400,
59 270
60 ],
61 "flags": [],
62 "order": 5,
63 "mode": 0,
64 "inputs": [
65 {
66 "name": "element",
67 "type": "ARRAY",
68 "link": 1
69 }
70 ],
71 "outputs": [
72 {
73 "name": "prompt",
74 "type": "DICT",
75 "links": [
76 4
77 ]
78 }
79 ],
80 "properties": {
81 "Node name for S&R": "BuildJsonPromptIdeogram"
82 },
83 "widgets_values": [
84 "",
85 "",
86 "none",
87 "",
88 "",
89 "",
90 []
91 ],
92 "widgets_values_named": {
93 "high_level_description": "",
94 "background": "",
95 "style": "none",
96 "aesthetics": "",
97 "lighting": "",
98 "medium": "",
99 "color_palette": []
100 }
101 },
102 {
103 "id": 4,
104 "type": "CreateBoundingBoxes",
105 "pos": [
106 -190,
107 630
108 ],
109 "size": [
110 470,
111 720
112 ],
113 "flags": [],
114 "order": 4,
115 "mode": 0,
116 "inputs": [
117 {
118 "name": "background",
119 "shape": 7,
120 "type": "IMAGE",
121 "link": 21
122 },
123 {
124 "name": "bboxes",
125 "shape": 7,
126 "type": "BOUNDING_BOX,ARRAY,STRING",
127 "link": null
128 }
129 ],
130 "outputs": [
131 {
132 "name": "preview",
133 "type": "IMAGE",
134 "links": null
135 },
136 {
137 "name": "bboxes",
138 "type": "BOUNDING_BOX",
139 "links": null
140 },
141 {
142 "name": "elements",
143 "type": "ARRAY",
144 "links": [
145 1
146 ]
147 }
148 ],
149 "properties": {
150 "Node name for S&R": "CreateBoundingBoxes"
151 },
152 "widgets_values": [
153 896,
154 1152,
155 [
156 {
157 "x": 448,
158 "y": 384,
159 "width": 128,
160 "height": 128,
161 "metadata": {
162 "type": "obj",
163 "text": "",
164 "desc": "Change the earring to pearl earring",
165 "palette": []
166 }
167 }
168 ],
169 []
170 ],
171 "widgets_values_named": {
172 "width": 896,
173 "height": 1152,
174 "editor_state": [
175 {
176 "x": 448,
177 "y": 384,
178 "width": 128,
179 "height": 128,
180 "metadata": {
181 "type": "obj",
182 "text": "",
183 "desc": "Change the earring to pearl earring",
184 "palette": []
185 }
186 }
187 ],
188 "last_incoming": []
189 },
190 "color": "#322",
191 "bgcolor": "#533"
192 },
193 {
194 "id": 5,
195 "type": "PreviewAny",
196 "pos": [
197 750,
198 760
199 ],
200 "size": [
201 430,
202 400
203 ],
204 "flags": [],
205 "order": 6,
206 "mode": 0,
207 "inputs": [
208 {
209 "name": "source",
210 "type": "*",
211 "link": 4
212 }
213 ],
214 "outputs": [
215 {
216 "name": "STRING",
217 "type": "STRING",
218 "links": [
219 26
220 ]
221 }
222 ],
223 "properties": {
224 "Node name for S&R": "PreviewAny"
225 },
226 "widgets_values": [],
227 "widgets_values_named": []
228 },
229 {
230 "id": 7,
231 "type": "SaveImageAdvanced",
232 "pos": [
233 1680,
234 630
235 ],
236 "size": [
237 440,
238 520
239 ],
240 "flags": [],
241 "order": 8,
242 "mode": 0,
243 "inputs": [
244 {
245 "name": "images",
246 "type": "IMAGE",
247 "link": 25
248 }
249 ],
250 "outputs": [
251 {
252 "name": "images",
253 "type": "IMAGE",
254 "links": [
255 8
256 ]
257 }
258 ],
259 "properties": [],
260 "widgets_values": [
261 "ideogram4.5_image_edit",
262 "png",
263 "8-bit",
264 "sRGB"
265 ],
266 "widgets_values_named": {
267 "filename_prefix": "ideogram4.5_image_edit",
268 "format": "png",
269 "format.bit_depth": "8-bit",
270 "format.input_color_space": "sRGB"
271 }
272 },
273 {
274 "id": 8,
275 "type": "ImageCompare",
276 "pos": [
277 2170,
278 630
279 ],
280 "size": [
281 540,
282 530
283 ],
284 "flags": [],
285 "order": 9,
286 "mode": 0,
287 "inputs": [
288 {
289 "name": "image_a",
290 "shape": 7,
291 "type": "IMAGE",
292 "link": 23
293 },
294 {
295 "name": "image_b",
296 "shape": 7,
297 "type": "IMAGE",
298 "link": 8
299 }
300 ],
301 "outputs": [],
302 "properties": {
303 "Node name for S&R": "ImageCompare"
304 },
305 "widgets_values": [],
306 "widgets_values_named": []
307 },
308 {
309 "id": 18,
310 "type": "MarkdownNote",
311 "pos": [
312 -180,
313 1590
314 ],
315 "size": [
316 470,
317 140
318 ],
319 "flags": [],
320 "order": 1,
321 "mode": 0,
322 "inputs": [],
323 "outputs": [],
324 "properties": [],
325 "widgets_values": [
326 "- Enable [Nodes2.0](https://docs.comfy.org/interface/nodes-2) if you can't see the editor above\n- Load an image and draw BBox captions on it, like \"remove it\", to edit the image.\n"
327 ],
328 "widgets_values_named": {
329 "text": "- Enable [Nodes2.0](https://docs.comfy.org/interface/nodes-2) if you can't see the editor above\n- Load an image and draw BBox captions on it, like \"remove it\", to edit the image.\n"
330 },
331 "color": "#222",
332 "bgcolor": "#000"
333 },
334 {
335 "id": 19,
336 "type": "MarkdownNote",
337 "pos": [
338 -1140,
339 630
340 ],
341 "size": [
342 400,
343 300
344 ],
345 "flags": [],
346 "order": 2,
347 "mode": 0,
348 "inputs": [],
349 "outputs": [],
350 "properties": [],
351 "widgets_values": [
352 "## Input Asset\n\n- [redhair_girl_portrait.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/redhair_girl_portrait.png)\n\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
353 ],
354 "widgets_values_named": {
355 "text": "## Input Asset\n\n- [redhair_girl_portrait.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/redhair_girl_portrait.png)\n\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
356 },
357 "color": "#222",
358 "bgcolor": "#000"
359 },
360 {
361 "id": 20,
362 "type": "IdeogramPreciseEditApi",
363 "pos": [
364 1230,
365 630
366 ],
367 "size": [
368 400,
369 388
370 ],
371 "flags": [],
372 "order": 7,
373 "mode": 0,
374 "inputs": [
375 {
376 "name": "model.images.image_1",
377 "type": "IMAGE",
378 "link": 24
379 },
380 {
381 "name": "model.images.image_2",
382 "shape": 7,
383 "type": "IMAGE",
384 "link": null
385 },
386 {
387 "name": "model.images.image_3",
388 "shape": 7,
389 "type": "IMAGE",
390 "link": null
391 },
392 {
393 "name": "model.prompt",
394 "type": "STRING",
395 "widget": {
396 "name": "model.prompt"
397 },
398 "link": 26
399 },
400 {
401 "name": "model.context_window_bboxes",
402 "shape": 7,
403 "type": "BOUNDING_BOX",
404 "link": null
405 },
406 {
407 "name": "model.context_window_mask",
408 "shape": 7,
409 "type": "MASK",
410 "link": null
411 }
412 ],
413 "outputs": [
414 {
415 "name": "IMAGE",
416 "type": "IMAGE",
417 "links": [
418 25
419 ]
420 }
421 ],
422 "properties": {
423 "Node name for S&R": "IdeogramPreciseEditApi"
424 },
425 "widgets_values": [
426 "ideogram-4.5",
427 "",
428 "medium",
429 564797084,
430 "randomize",
431 "none",
432 2048
433 ],
434 "widgets_values_named": {
435 "model": "ideogram-4.5",
436 "model.prompt": "",
437 "model.quality": "medium",
438 "model.seed": 564797084,
439 "control_after_generate#1": "randomize",
440 "model.context_window": "none",
441 "control_after_generate": 2048
442 },
443 "color": "#432",
444 "bgcolor": "#653"
445 },
446 {
447 "id": 21,
448 "type": "MarkdownNote",
449 "pos": [
450 1238.9264643449235,
451 1080.8908963986328
452 ],
453 "size": [
454 394.43923211212143,
455 158.1637813438415
456 ],
457 "flags": [],
458 "order": 3,
459 "mode": 0,
460 "inputs": [],
461 "outputs": [],
462 "title": "Note: context window",
463 "properties": [],
464 "widgets_values": [
465 "# Ideogram 4.5 Precise Edit — `context_window`\n\nEdits **only one region of image 1** at its native resolution. Without it the whole image is capped at ~4 MP (2048×2048), so anything bigger comes back downscaled. With a region, only the region changes, the rest is copied through, and the output keeps the source's exact size.\n\n| Option | Uses | Effect |\n|---|---|---|\n| `none` | — | Whole image, downscaled above ~4 MP. Default. |\n| `auto` | `context_window_mask` | Fits a region around the white mask area. Mask > 4 MP falls back to `none`. |\n| `custom` | `context_window_bboxes` | Region = union of your boxes. Sides under 256 px are padded to 256. |\n\nRegion must be 256–4608 px per side, ≤ 4 MP, ≤ 6:1, inside image 1. Max 4 reference images, 3 with a mask. Price is unchanged — one image at the chosen `quality`.\n"
466 ],
467 "widgets_values_named": {
468 "text": "# Ideogram 4.5 Precise Edit — `context_window`\n\nEdits **only one region of image 1** at its native resolution. Without it the whole image is capped at ~4 MP (2048×2048), so anything bigger comes back downscaled. With a region, only the region changes, the rest is copied through, and the output keeps the source's exact size.\n\n| Option | Uses | Effect |\n|---|---|---|\n| `none` | — | Whole image, downscaled above ~4 MP. Default. |\n| `auto` | `context_window_mask` | Fits a region around the white mask area. Mask > 4 MP falls back to `none`. |\n| `custom` | `context_window_bboxes` | Region = union of your boxes. Sides under 256 px are padded to 256. |\n\nRegion must be 256–4608 px per side, ≤ 4 MP, ≤ 6:1, inside image 1. Max 4 reference images, 3 with a mask. Price is unchanged — one image at the chosen `quality`.\n"
469 },
470 "color": "#222",
471 "bgcolor": "#000"
472 }
473 ],
474 "links": [
475 [
476 4,
477 3,
478 0,
479 5,
480 0,
481 "DICT"
482 ],
483 [
484 8,
485 7,
486 0,
487 8,
488 1,
489 "IMAGE"
490 ],
491 [
492 21,
493 2,
494 0,
495 4,
496 0,
497 "IMAGE"
498 ],
499 [
500 23,
501 2,
502 0,
503 8,
504 0,
505 "IMAGE"
506 ],
507 [
508 1,
509 4,
510 2,
511 3,
512 0,
513 "ARRAY"
514 ],
515 [
516 25,
517 20,
518 0,
519 7,
520 0,
521 "IMAGE"
522 ],
523 [
524 24,
525 2,
526 0,
527 20,
528 0,
529 "IMAGE"
530 ],
531 [
532 26,
533 5,
534 0,
535 20,
536 3,
537 "STRING"
538 ]
539 ],
540 "groups": [],
541 "config": [],
542 "extra": {
543 "ds": {
544 "scale": 0.3186308177103567,
545 "offset": [
546 1898.9809645882465,
547 689.3844590357785
548 ]
549 },
550 "frontendVersion": "1.57.6"
551 },
552 "version": 0.4
553}