工作流 /
图像 /
图像编辑

图像编辑
Image Edit
从一张图像和一个空提示词开始,然后描述你想要的编辑效果。Nano Banana 2 会生成修改后的图像,同时保持主体一致性和较高的视觉保真度。
图像
4 个节点 1 个输入 17 次使用 ComfyUI ≥ 0.25.0 ComfyUI 12 KB
节点构成
LoadImage
× 1
4d2ab4f5-8f54-4b5b-a4e2-49b35a60ad9d
× 1
SaveImage
× 1
MarkdownNote
× 1
官方标注的模型
GoogleNano Banana 2
工作流 JSON
和上面「下载工作流 JSON」是同一份文件。
1{
2 "id": "e4ac4a17-61f7-4ac8-b322-b156808ebd9c",
3 "revision": 0,
4 "last_node_id": 5,
5 "last_link_id": 2,
6 "nodes": [
7 {
8 "id": 1,
9 "type": "LoadImage",
10 "pos": [
11 -1570,
12 5130
13 ],
14 "size": [
15 380,
16 400
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [
22 {
23 "localized_name": "image",
24 "name": "image",
25 "type": "COMBO",
26 "widget": {
27 "name": "image"
28 },
29 "link": null
30 },
31 {
32 "localized_name": "choose file to upload",
33 "name": "upload",
34 "type": "IMAGEUPLOAD",
35 "widget": {
36 "name": "upload"
37 },
38 "link": null
39 }
40 ],
41 "outputs": [
42 {
43 "localized_name": "IMAGE",
44 "name": "IMAGE",
45 "type": "IMAGE",
46 "links": [
47 1
48 ]
49 },
50 {
51 "localized_name": "MASK",
52 "name": "MASK",
53 "type": "MASK",
54 "links": null
55 }
56 ],
57 "properties": {
58 "Node name for S&R": "LoadImage"
59 },
60 "widgets_values": [
61 "saintly_rose_portrait.png",
62 "image"
63 ],
64 "widgets_values_named": {
65 "image": "man_with_dog.png",
66 "upload": "image"
67 }
68 },
69 {
70 "id": 2,
71 "type": "4d2ab4f5-8f54-4b5b-a4e2-49b35a60ad9d",
72 "pos": [
73 -1100,
74 5130
75 ],
76 "size": [
77 420,
78 260
79 ],
80 "flags": [],
81 "order": 1,
82 "mode": 0,
83 "inputs": [
84 {
85 "localized_name": "image",
86 "name": "image",
87 "type": "IMAGE",
88 "link": 1
89 },
90 {
91 "localized_name": "prompt",
92 "name": "prompt",
93 "type": "STRING",
94 "widget": {
95 "name": "prompt"
96 },
97 "link": null
98 }
99 ],
100 "outputs": [
101 {
102 "localized_name": "IMAGE",
103 "name": "IMAGE",
104 "type": "IMAGE",
105 "links": [
106 2
107 ]
108 }
109 ],
110 "properties": {
111 "cnr_id": "comfy-core",
112 "previewExposures": [],
113 "ver": "0.33.0"
114 },
115 "widgets_values": [
116 ""
117 ],
118 "widgets_values_named": {
119 "prompt": ""
120 }
121 },
122 {
123 "id": 4,
124 "type": "SaveImage",
125 "pos": [
126 -600,
127 5130
128 ],
129 "size": [
130 270,
131 130
132 ],
133 "flags": [],
134 "order": 2,
135 "mode": 0,
136 "inputs": [
137 {
138 "name": "images",
139 "type": "IMAGE",
140 "link": 2
141 }
142 ],
143 "outputs": [],
144 "properties": {
145 "cnr_id": "comfy-core",
146 "ver": "0.20.1"
147 },
148 "widgets_values": [
149 "api_google_nano_banana2_image_edit_continuation"
150 ]
151 },
152 {
153 "id": 5,
154 "type": "MarkdownNote",
155 "pos": [
156 -1100,
157 5450
158 ],
159 "size": [
160 420,
161 130
162 ],
163 "flags": [],
164 "order": 3,
165 "mode": 0,
166 "inputs": [],
167 "outputs": [],
168 "properties": [],
169 "widgets_values": [
170 "## Describe your edit\n\nWrite what you want to change in the prompt above, then click **Run**."
171 ],
172 "widgets_values_named": {
173 "markdown": "## Describe your edit\n\nWrite what you want to change in the prompt above, then click **Run**."
174 },
175 "title": "What to do"
176 }
177 ],
178 "links": [
179 [
180 1,
181 1,
182 0,
183 2,
184 0,
185 "IMAGE"
186 ],
187 [
188 2,
189 2,
190 0,
191 4,
192 0,
193 "IMAGE"
194 ]
195 ],
196 "groups": [],
197 "config": [],
198 "extra": {
199 "ds": {
200 "scale": 0.9,
201 "offset": [
202 2050,
203 -4660
204 ]
205 },
206 "frontendVersion": "1.49.6"
207 },
208 "version": 0.4,
209 "definitions": {
210 "subgraphs": [
211 {
212 "id": "4d2ab4f5-8f54-4b5b-a4e2-49b35a60ad9d",
213 "version": 1,
214 "state": {
215 "lastGroupId": 0,
216 "lastNodeId": 2,
217 "lastLinkId": 3,
218 "lastRerouteId": 0
219 },
220 "revision": 0,
221 "config": [],
222 "name": "Edit Image (Nano Banana 2)",
223 "inputs": [
224 {
225 "id": "a53f5655-a38e-4fd0-90d7-acde6a1d63e5",
226 "name": "image",
227 "type": "IMAGE",
228 "linkIds": [
229 1
230 ],
231 "localized_name": "image",
232 "pos": [
233 -200,
234 80
235 ]
236 },
237 {
238 "id": "3a7bb9b5-3d98-4a53-baa3-24feef62d92b",
239 "name": "prompt",
240 "type": "STRING",
241 "linkIds": [
242 2
243 ],
244 "localized_name": "prompt",
245 "pos": [
246 -200,
247 100
248 ]
249 }
250 ],
251 "outputs": [
252 {
253 "id": "d76b9248-6c2c-41a7-b1b5-40dfd1fa2308",
254 "name": "IMAGE",
255 "type": "IMAGE",
256 "linkIds": [
257 3
258 ],
259 "localized_name": "IMAGE",
260 "pos": [
261 600,
262 100
263 ]
264 }
265 ],
266 "nodes": [
267 {
268 "id": 2,
269 "type": "GeminiNanoBanana2V2",
270 "pos": [
271 0,
272 0
273 ],
274 "size": [
275 400,
276 398
277 ],
278 "flags": [],
279 "order": 0,
280 "mode": 0,
281 "inputs": [
282 {
283 "localized_name": "prompt",
284 "name": "prompt",
285 "type": "STRING",
286 "widget": {
287 "name": "prompt"
288 },
289 "link": 2
290 },
291 {
292 "localized_name": "model",
293 "name": "model",
294 "type": "COMFY_DYNAMICCOMBO_V3",
295 "widget": {
296 "name": "model"
297 },
298 "link": null
299 },
300 {
301 "localized_name": "aspect_ratio",
302 "name": "model.aspect_ratio",
303 "type": "COMBO",
304 "widget": {
305 "name": "model.aspect_ratio"
306 },
307 "link": null
308 },
309 {
310 "localized_name": "resolution",
311 "name": "model.resolution",
312 "type": "COMBO",
313 "widget": {
314 "name": "model.resolution"
315 },
316 "link": null
317 },
318 {
319 "localized_name": "thinking_level",
320 "name": "model.thinking_level",
321 "type": "COMBO",
322 "widget": {
323 "name": "model.thinking_level"
324 },
325 "link": null
326 },
327 {
328 "localized_name": "image_1",
329 "name": "model.images.image_1",
330 "shape": 7,
331 "type": "IMAGE",
332 "link": 1
333 },
334 {
335 "localized_name": "image_2",
336 "name": "model.images.image_2",
337 "shape": 7,
338 "type": "IMAGE",
339 "link": null
340 },
341 {
342 "localized_name": "files",
343 "name": "model.files",
344 "shape": 7,
345 "type": "GEMINI_INPUT_FILES",
346 "link": null
347 },
348 {
349 "localized_name": "seed",
350 "name": "seed",
351 "type": "INT",
352 "widget": {
353 "name": "seed"
354 },
355 "link": null
356 },
357 {
358 "localized_name": "response_modalities",
359 "name": "response_modalities",
360 "type": "COMBO",
361 "widget": {
362 "name": "response_modalities"
363 },
364 "link": null
365 },
366 {
367 "localized_name": "system_prompt",
368 "name": "system_prompt",
369 "shape": 7,
370 "type": "STRING",
371 "widget": {
372 "name": "system_prompt"
373 },
374 "link": null
375 },
376 {
377 "localized_name": "temperature",
378 "name": "temperature",
379 "shape": 7,
380 "type": "FLOAT",
381 "widget": {
382 "name": "temperature"
383 },
384 "link": null
385 },
386 {
387 "localized_name": "top_p",
388 "name": "top_p",
389 "shape": 7,
390 "type": "FLOAT",
391 "widget": {
392 "name": "top_p"
393 },
394 "link": null
395 }
396 ],
397 "outputs": [
398 {
399 "localized_name": "IMAGE",
400 "name": "IMAGE",
401 "type": "IMAGE",
402 "links": [
403 3
404 ]
405 },
406 {
407 "localized_name": "STRING",
408 "name": "STRING",
409 "type": "STRING",
410 "links": null
411 },
412 {
413 "localized_name": "thought_image",
414 "name": "thought_image",
415 "type": "IMAGE",
416 "links": null
417 }
418 ],
419 "properties": {
420 "Node name for S&R": "GeminiNanoBanana2V2"
421 },
422 "widgets_values": [
423 "",
424 "Nano Banana 2 (Gemini 3.1 Flash Image)",
425 "auto",
426 "1K",
427 "HIGH",
428 123,
429 "randomize",
430 "IMAGE",
431 "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests.",
432 1,
433 0.95
434 ],
435 "widgets_values_named": {
436 "prompt": "",
437 "model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
438 "model.aspect_ratio": "auto",
439 "model.resolution": "1K",
440 "model.thinking_level": "HIGH",
441 "seed": 123,
442 "control_after_generate": "randomize",
443 "response_modalities": "IMAGE",
444 "system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests.",
445 "temperature": 1,
446 "top_p": 0.95
447 },
448 "color": "#432",
449 "bgcolor": "#653"
450 }
451 ],
452 "groups": [],
453 "links": [
454 {
455 "id": 1,
456 "origin_id": -10,
457 "origin_slot": 0,
458 "target_id": 2,
459 "target_slot": 5,
460 "type": "IMAGE"
461 },
462 {
463 "id": 2,
464 "origin_id": -10,
465 "origin_slot": 1,
466 "target_id": 2,
467 "target_slot": 0,
468 "type": "STRING"
469 },
470 {
471 "id": 3,
472 "origin_id": 2,
473 "origin_slot": 0,
474 "target_id": -20,
475 "target_slot": 0,
476 "type": "IMAGE"
477 }
478 ],
479 "extra": {
480 "workflowRendererVersion": "Vue"
481 },
482 "widgets": [],
483 "inputNode": {
484 "id": -10,
485 "bounding": [
486 -230,
487 40,
488 128,
489 88
490 ]
491 },
492 "outputNode": {
493 "id": -20,
494 "bounding": [
495 580,
496 60,
497 128,
498 68
499 ]
500 }
501 }
502 ]
503 }
504}