ComfyPilotComfyPilot
工作流 / 视频 / Wan 2.2 5B Fun Inpaint
Wan 2.2 5B Fun Inpaint

Wan 2.2 5B Fun Inpaint

Wan 2.2 5B Fun Inpaint

从起始帧和结束帧高效进行视频局部重绘。5B模型可快速迭代,适用于测试工作流。

视频 14 个节点 2 个输入 2 次使用 ComfyUI ≥ 0.3.46 ComfyUI 17 KB

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

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

需要的权重

这个工作流引用了 3 个权重文件,其中 3 个能在本站模型库里找到。

umt5_xxl_fp8_e4m3fn_scaled.safetensors 在模型库查看
wan2.2_fun_inpaint_5B_bf16.safetensors 在模型库查看
wan2.2_vae.safetensors 在模型库查看

节点构成

CLIPTextEncode × 2
LoadImage × 2
CLIPLoader × 1
VAEDecode × 1
SaveVideo × 1
VAELoader × 1
UNETLoader × 1
ModelSamplingSD3 × 1
WanFunInpaintToVideo × 1
KSampler × 1
MarkdownNote × 1
CreateVideo × 1

官方标注的模型

Wan2.2Wan

工作流 JSON

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

1{
2 "id": "91f6bbe2-ed41-4fd6-bac7-71d5b5864ecb",
3 "revision": 0,
4 "last_node_id": 74,
5 "last_link_id": 137,
6 "nodes": [
7 {
8 "id": 38,
9 "type": "CLIPLoader",
10 "pos": [
11 -30,
12 190
13 ],
14 "size": [
15 350,
16 110
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "CLIP",
25 "type": "CLIP",
26 "slot_index": 0,
27 "links": [
28 74,
29 75
30 ]
31 }
32 ],
33 "properties": {
34 "Node name for S&R": "CLIPLoader",
35 "cnr_id": "comfy-core",
36 "ver": "0.3.45",
37 "models": [
38 {
39 "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
40 "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
41 "directory": "text_encoders"
42 }
43 ]
44 },
45 "widgets_values": [
46 "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
47 "wan",
48 "default"
49 ]
50 },
51 {
52 "id": 8,
53 "type": "VAEDecode",
54 "pos": [
55 1220,
56 640
57 ],
58 "size": [
59 210,
60 46
61 ],
62 "flags": [],
63 "order": 11,
64 "mode": 0,
65 "inputs": [
66 {
67 "name": "samples",
68 "type": "LATENT",
69 "link": 35
70 },
71 {
72 "name": "vae",
73 "type": "VAE",
74 "link": 76
75 }
76 ],
77 "outputs": [
78 {
79 "name": "IMAGE",
80 "type": "IMAGE",
81 "slot_index": 0,
82 "links": [
83 107
84 ]
85 }
86 ],
87 "properties": {
88 "Node name for S&R": "VAEDecode",
89 "cnr_id": "comfy-core",
90 "ver": "0.3.45"
91 },
92 "widgets_values": []
93 },
94 {
95 "id": 58,
96 "type": "SaveVideo",
97 "pos": [
98 1560,
99 110
100 ],
101 "size": [
102 660,
103 758
104 ],
105 "flags": [],
106 "order": 13,
107 "mode": 0,
108 "inputs": [
109 {
110 "name": "video",
111 "type": "VIDEO",
112 "link": 108
113 }
114 ],
115 "outputs": [],
116 "properties": {
117 "Node name for S&R": "SaveVideo",
118 "cnr_id": "comfy-core",
119 "ver": "0.3.45"
120 },
121 "widgets_values": [
122 "video/ComfyUI",
123 "auto",
124 "auto"
125 ]
126 },
127 {
128 "id": 7,
129 "type": "CLIPTextEncode",
130 "pos": [
131 380,
132 260
133 ],
134 "size": [
135 425.27801513671875,
136 180.6060791015625
137 ],
138 "flags": [],
139 "order": 7,
140 "mode": 0,
141 "inputs": [
142 {
143 "name": "clip",
144 "type": "CLIP",
145 "link": 75
146 }
147 ],
148 "outputs": [
149 {
150 "name": "CONDITIONING",
151 "type": "CONDITIONING",
152 "slot_index": 0,
153 "links": [
154 130
155 ]
156 }
157 ],
158 "title": "CLIP Text Encode (Negative Prompt)",
159 "properties": {
160 "Node name for S&R": "CLIPTextEncode",
161 "cnr_id": "comfy-core",
162 "ver": "0.3.45"
163 },
164 "widgets_values": [
165 "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
166 ],
167 "color": "#322",
168 "bgcolor": "#533"
169 },
170 {
171 "id": 39,
172 "type": "VAELoader",
173 "pos": [
174 -30,
175 350
176 ],
177 "size": [
178 350,
179 60
180 ],
181 "flags": [],
182 "order": 1,
183 "mode": 0,
184 "inputs": [],
185 "outputs": [
186 {
187 "name": "VAE",
188 "type": "VAE",
189 "slot_index": 0,
190 "links": [
191 76,
192 134
193 ]
194 }
195 ],
196 "properties": {
197 "Node name for S&R": "VAELoader",
198 "cnr_id": "comfy-core",
199 "ver": "0.3.45",
200 "models": [
201 {
202 "name": "wan2.2_vae.safetensors",
203 "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors",
204 "directory": "vae"
205 }
206 ]
207 },
208 "widgets_values": [
209 "wan2.2_vae.safetensors"
210 ]
211 },
212 {
213 "id": 37,
214 "type": "UNETLoader",
215 "pos": [
216 -30,
217 50
218 ],
219 "size": [
220 346.7470703125,
221 82
222 ],
223 "flags": [],
224 "order": 2,
225 "mode": 0,
226 "inputs": [],
227 "outputs": [
228 {
229 "name": "MODEL",
230 "type": "MODEL",
231 "slot_index": 0,
232 "links": [
233 94
234 ]
235 }
236 ],
237 "properties": {
238 "Node name for S&R": "UNETLoader",
239 "cnr_id": "comfy-core",
240 "ver": "0.3.45",
241 "models": [
242 {
243 "name": "wan2.2_fun_inpaint_5B_bf16.safetensors",
244 "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_inpaint_5B_bf16.safetensors",
245 "directory": "diffusion_models"
246 }
247 ]
248 },
249 "widgets_values": [
250 "wan2.2_fun_inpaint_5B_bf16.safetensors",
251 "default"
252 ]
253 },
254 {
255 "id": 48,
256 "type": "ModelSamplingSD3",
257 "pos": [
258 1220,
259 10
260 ],
261 "size": [
262 210,
263 58
264 ],
265 "flags": {
266 "collapsed": false
267 },
268 "order": 8,
269 "mode": 0,
270 "inputs": [
271 {
272 "name": "model",
273 "type": "MODEL",
274 "link": 94
275 }
276 ],
277 "outputs": [
278 {
279 "name": "MODEL",
280 "type": "MODEL",
281 "slot_index": 0,
282 "links": [
283 95
284 ]
285 }
286 ],
287 "properties": {
288 "Node name for S&R": "ModelSamplingSD3",
289 "cnr_id": "comfy-core",
290 "ver": "0.3.45"
291 },
292 "widgets_values": [
293 8
294 ]
295 },
296 {
297 "id": 73,
298 "type": "WanFunInpaintToVideo",
299 "pos": [
300 880,
301 50
302 ],
303 "size": [
304 270,
305 230
306 ],
307 "flags": [],
308 "order": 9,
309 "mode": 0,
310 "inputs": [
311 {
312 "name": "positive",
313 "type": "CONDITIONING",
314 "link": 129
315 },
316 {
317 "name": "negative",
318 "type": "CONDITIONING",
319 "link": 130
320 },
321 {
322 "name": "vae",
323 "type": "VAE",
324 "link": 134
325 },
326 {
327 "name": "clip_vision_output",
328 "shape": 7,
329 "type": "CLIP_VISION_OUTPUT",
330 "link": null
331 },
332 {
333 "name": "start_image",
334 "shape": 7,
335 "type": "IMAGE",
336 "link": 136
337 },
338 {
339 "name": "end_image",
340 "shape": 7,
341 "type": "IMAGE",
342 "link": 137
343 }
344 ],
345 "outputs": [
346 {
347 "name": "positive",
348 "type": "CONDITIONING",
349 "links": [
350 131
351 ]
352 },
353 {
354 "name": "negative",
355 "type": "CONDITIONING",
356 "links": [
357 132
358 ]
359 },
360 {
361 "name": "latent",
362 "type": "LATENT",
363 "links": [
364 133
365 ]
366 }
367 ],
368 "properties": {
369 "Node name for S&R": "WanFunInpaintToVideo",
370 "cnr_id": "comfy-core",
371 "ver": "0.3.56"
372 },
373 "widgets_values": [
374 640,
375 640,
376 81,
377 1
378 ]
379 },
380 {
381 "id": 3,
382 "type": "KSampler",
383 "pos": [
384 1220,
385 110
386 ],
387 "size": [
388 315,
389 474
390 ],
391 "flags": [],
392 "order": 10,
393 "mode": 0,
394 "inputs": [
395 {
396 "name": "model",
397 "type": "MODEL",
398 "link": 95
399 },
400 {
401 "name": "positive",
402 "type": "CONDITIONING",
403 "link": 131
404 },
405 {
406 "name": "negative",
407 "type": "CONDITIONING",
408 "link": 132
409 },
410 {
411 "name": "latent_image",
412 "type": "LATENT",
413 "link": 133
414 }
415 ],
416 "outputs": [
417 {
418 "name": "LATENT",
419 "type": "LATENT",
420 "slot_index": 0,
421 "links": [
422 35
423 ]
424 }
425 ],
426 "properties": {
427 "Node name for S&R": "KSampler",
428 "cnr_id": "comfy-core",
429 "ver": "0.3.45"
430 },
431 "widgets_values": [
432 115716327295867,
433 "randomize",
434 20,
435 6,
436 "uni_pc",
437 "simple",
438 1
439 ]
440 },
441 {
442 "id": 6,
443 "type": "CLIPTextEncode",
444 "pos": [
445 380,
446 50
447 ],
448 "size": [
449 422.84503173828125,
450 164.31304931640625
451 ],
452 "flags": [],
453 "order": 6,
454 "mode": 0,
455 "inputs": [
456 {
457 "name": "clip",
458 "type": "CLIP",
459 "link": 74
460 }
461 ],
462 "outputs": [
463 {
464 "name": "CONDITIONING",
465 "type": "CONDITIONING",
466 "slot_index": 0,
467 "links": [
468 129
469 ]
470 }
471 ],
472 "title": "CLIP Text Encode (Positive Prompt)",
473 "properties": {
474 "Node name for S&R": "CLIPTextEncode",
475 "cnr_id": "comfy-core",
476 "ver": "0.3.45"
477 },
478 "widgets_values": [
479 "Flowers are in full bloom, time-lapse photography"
480 ],
481 "color": "#232",
482 "bgcolor": "#353"
483 },
484 {
485 "id": 59,
486 "type": "MarkdownNote",
487 "pos": [
488 -550,
489 10
490 ],
491 "size": [
492 480,
493 340
494 ],
495 "flags": [],
496 "order": 3,
497 "mode": 0,
498 "inputs": [],
499 "outputs": [],
500 "title": "Model Links",
501 "properties": [],
502 "widgets_values": [
503 "## Model Links\n\n- [Hugging Face:Comfy-Org/Wan_2.2_ComfyUI_Repackaged](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged)\n- [Hugging Face:Comfy-Org/Wan_2.1_ComfyUI_repackaged](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged)\n\n**ModelScope mirrors** (alternative repo location)\n\n- [ModelScope:Comfy-Org/Wan_2.2_ComfyUI_Repackaged](https://modelscope.cn/models/Comfy-Org/Wan_2.2_ComfyUI_Repackaged)\n- [ModelScope:Comfy-Org/Wan_2.1_ComfyUI_repackaged](https://modelscope.cn/models/Comfy-Org/Wan_2.1_ComfyUI_repackaged)\n\n**Diffusion Model**\n- [wan2.2_fun_inpaint_5B_bf16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_inpaint_5B_bf16.safetensors) (9.31 GB)\n\n**VAE**\n- [wan2.2_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors) (1.31 GB)\n\n**Text Encoder** \n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors) (6.27 GB)\n\nFile save location\n\n```\nComfyUI/\n├───📂 models/\n│ ├───📂 diffusion_models/\n│ │ └───wan2.2_fun_inpaint_5B_bf16.safetensors\n│ ├───📂 text_encoders/\n│ │ └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors \n│ └───📂 vae/\n│ └── wan2.2_vae.safetensors\n```\n"
504 ],
505 "color": "#222",
506 "bgcolor": "#000"
507 },
508 {
509 "id": 70,
510 "type": "LoadImage",
511 "pos": [
512 -20,
513 560
514 ],
515 "size": [
516 340,
517 340
518 ],
519 "flags": [],
520 "order": 4,
521 "mode": 0,
522 "inputs": [],
523 "outputs": [
524 {
525 "name": "IMAGE",
526 "type": "IMAGE",
527 "slot_index": 0,
528 "links": [
529 136
530 ]
531 },
532 {
533 "name": "MASK",
534 "type": "MASK",
535 "slot_index": 1,
536 "links": null
537 }
538 ],
539 "properties": {
540 "Node name for S&R": "LoadImage",
541 "cnr_id": "comfy-core",
542 "ver": "0.3.49",
543 "enableTabs": false,
544 "tabWidth": 65,
545 "tabXOffset": 10,
546 "hasSecondTab": false,
547 "secondTabText": "Send Back",
548 "secondTabOffset": 80,
549 "secondTabWidth": 65,
550 "ue_properties": {
551 "widget_ue_connectable": []
552 }
553 },
554 "widgets_values": [
555 "video_wan2_2_5B_fun_inpaint_start_image.png",
556 "image"
557 ]
558 },
559 {
560 "id": 74,
561 "type": "LoadImage",
562 "pos": [
563 390,
564 560
565 ],
566 "size": [
567 340,
568 340
569 ],
570 "flags": [],
571 "order": 5,
572 "mode": 0,
573 "inputs": [],
574 "outputs": [
575 {
576 "name": "IMAGE",
577 "type": "IMAGE",
578 "slot_index": 0,
579 "links": [
580 137
581 ]
582 },
583 {
584 "name": "MASK",
585 "type": "MASK",
586 "slot_index": 1,
587 "links": null
588 }
589 ],
590 "properties": {
591 "Node name for S&R": "LoadImage",
592 "cnr_id": "comfy-core",
593 "ver": "0.3.49",
594 "enableTabs": false,
595 "tabWidth": 65,
596 "tabXOffset": 10,
597 "hasSecondTab": false,
598 "secondTabText": "Send Back",
599 "secondTabOffset": 80,
600 "secondTabWidth": 65,
601 "ue_properties": {
602 "widget_ue_connectable": []
603 }
604 },
605 "widgets_values": [
606 "video_wan2_2_5B_fun_inpaint_end_image.png",
607 "image"
608 ]
609 },
610 {
611 "id": 57,
612 "type": "CreateVideo",
613 "pos": [
614 1220,
615 730
616 ],
617 "size": [
618 270,
619 78
620 ],
621 "flags": [],
622 "order": 12,
623 "mode": 0,
624 "inputs": [
625 {
626 "name": "images",
627 "type": "IMAGE",
628 "link": 107
629 },
630 {
631 "name": "audio",
632 "shape": 7,
633 "type": "AUDIO",
634 "link": null
635 }
636 ],
637 "outputs": [
638 {
639 "name": "VIDEO",
640 "type": "VIDEO",
641 "links": [
642 108
643 ]
644 }
645 ],
646 "properties": {
647 "Node name for S&R": "CreateVideo",
648 "cnr_id": "comfy-core",
649 "ver": "0.3.45"
650 },
651 "widgets_values": [
652 24
653 ]
654 }
655 ],
656 "links": [
657 [
658 35,
659 3,
660 0,
661 8,
662 0,
663 "LATENT"
664 ],
665 [
666 74,
667 38,
668 0,
669 6,
670 0,
671 "CLIP"
672 ],
673 [
674 75,
675 38,
676 0,
677 7,
678 0,
679 "CLIP"
680 ],
681 [
682 76,
683 39,
684 0,
685 8,
686 1,
687 "VAE"
688 ],
689 [
690 94,
691 37,
692 0,
693 48,
694 0,
695 "MODEL"
696 ],
697 [
698 95,
699 48,
700 0,
701 3,
702 0,
703 "MODEL"
704 ],
705 [
706 107,
707 8,
708 0,
709 57,
710 0,
711 "IMAGE"
712 ],
713 [
714 108,
715 57,
716 0,
717 58,
718 0,
719 "VIDEO"
720 ],
721 [
722 129,
723 6,
724 0,
725 73,
726 0,
727 "CONDITIONING"
728 ],
729 [
730 130,
731 7,
732 0,
733 73,
734 1,
735 "CONDITIONING"
736 ],
737 [
738 131,
739 73,
740 0,
741 3,
742 1,
743 "CONDITIONING"
744 ],
745 [
746 132,
747 73,
748 1,
749 3,
750 2,
751 "CONDITIONING"
752 ],
753 [
754 133,
755 73,
756 2,
757 3,
758 3,
759 "LATENT"
760 ],
761 [
762 134,
763 39,
764 0,
765 73,
766 2,
767 "VAE"
768 ],
769 [
770 136,
771 70,
772 0,
773 73,
774 4,
775 "IMAGE"
776 ],
777 [
778 137,
779 74,
780 0,
781 73,
782 5,
783 "IMAGE"
784 ]
785 ],
786 "groups": [
787 {
788 "id": 1,
789 "title": "Step1 - Load models",
790 "bounding": [
791 -50,
792 -20,
793 400,
794 470
795 ],
796 "color": "#3f789e",
797 "font_size": 24,
798 "flags": []
799 },
800 {
801 "id": 2,
802 "title": "Step3 - Prompt",
803 "bounding": [
804 370,
805 -20,
806 448.27801513671875,
807 473.2060852050781
808 ],
809 "color": "#3f789e",
810 "font_size": 24,
811 "flags": []
812 },
813 {
814 "id": 3,
815 "title": "Step 2 - Start_image",
816 "bounding": [
817 -50,
818 470,
819 870,
820 470
821 ],
822 "color": "#3f789e",
823 "font_size": 24,
824 "flags": []
825 },
826 {
827 "id": 7,
828 "title": "Step 4 - Video size and length",
829 "bounding": [
830 830,
831 -20,
832 360,
833 320
834 ],
835 "color": "#3f789e",
836 "font_size": 24,
837 "flags": []
838 }
839 ],
840 "config": [],
841 "extra": {
842 "ds": {
843 "scale": 0.5305743634736484,
844 "offset": [
845 809.9103880098293,
846 405.07387818292233
847 ]
848 },
849 "frontendVersion": "1.29.2",
850 "VHS_latentpreview": false,
851 "VHS_latentpreviewrate": 0,
852 "VHS_MetadataImage": true,
853 "VHS_KeepIntermediate": true
854 },
855 "version": 0.4
856}