bleckhert commited on
Commit
9d191ec
·
verified ·
1 Parent(s): 51be342

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +520 -1331
index.html CHANGED
@@ -5,24 +5,134 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>ComfyUI Workflow</title>
7
  <style>
 
 
 
 
 
8
  body {
9
- font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
10
  background-color: #000000;
11
  color: #f5f5f7;
12
- padding: 40px;
13
- }
14
- pre {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  background: #1d1d1f;
16
- padding: 24px;
17
- border-radius: 12px;
 
 
 
 
 
 
 
 
 
18
  overflow-x: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
  </style>
21
  </head>
22
  <body>
23
- <h1>ComfyUI Workflow</h1>
24
- <p>Error: Invalid JSON format</p>
25
- <pre>{
 
 
 
 
 
 
 
 
 
 
26
  "last_node_id": 45,
27
  "last_link_id": 58,
28
  "nodes": [
@@ -59,10 +169,10 @@
59
  "properties": {
60
  "Node name": "LoadImage"
61
  },
62
- "widgets_values": [
63
- "source_face.png",
64
- "image"
65
- ]
66
  },
67
  {
68
  "id": 2,
@@ -73,7 +183,7 @@
73
  ],
74
  "size": [
75
  315,
76
- 294
77
  ],
78
  "flags": {},
79
  "order": 1,
@@ -89,42 +199,37 @@
89
  "slot_index": 0
90
  },
91
  {
92
- "name": "AUDIO",
93
- "type": "AUDIO",
94
- "links": null
95
- },
96
- {
97
- "name": "frame_rate",
98
  "type": "FLOAT",
99
  "links": null
100
- },
101
- {
102
- "name": "frame_count",
103
- "type": "INT",
104
- "links": null
105
  }
106
  ],
107
  "properties": {
108
  "Node name": "LoadVideo"
109
  },
110
- "widgets_values": [
111
- "target_video.mp4",
112
- "video"
113
- ]
 
 
 
 
 
114
  },
115
  {
116
  "id": 3,
117
  "type": "ReActorFaceSwap",
118
  "pos": [
119
- 500,
120
  100
121
  ],
122
  "size": [
123
  315,
124
- 414
125
  ],
126
  "flags": {},
127
- "order": 2,
128
  "mode": 0,
129
  "inputs": [
130
  {
@@ -136,6 +241,11 @@
136
  "name": "target_image",
137
  "type": "IMAGE",
138
  "link": 2
 
 
 
 
 
139
  }
140
  ],
141
  "outputs": [
@@ -151,111 +261,78 @@
151
  "properties": {
152
  "Node name": "ReActorFaceSwap"
153
  },
154
- "widgets_values": [
155
- true,
156
- 0,
157
- 1,
158
- "Source Image 1, Source Image 2",
159
- "all",
160
- "all",
161
- "0",
162
- "0",
163
- false,
164
- "None",
165
- "None",
166
- false,
167
- false,
168
- "0",
169
- "1",
170
- false,
171
- false,
172
- false,
173
- false,
174
- false,
175
- false,
176
- false,
177
- false,
178
- false,
179
- false,
180
- "None",
181
- "None",
182
- false,
183
- false
184
- ]
185
  },
186
  {
187
  "id": 4,
188
- "type": "GetImageSize",
189
  "pos": [
190
- 500,
191
  550
192
  ],
193
  "size": [
194
- 210,
195
- 82
196
  ],
197
  "flags": {},
198
- "order": 3,
199
  "mode": 0,
200
- "inputs": [
201
- {
202
- "name": "image",
203
- "type": "IMAGE",
204
- "link": 2
205
- }
206
- ],
207
  "outputs": [
208
  {
209
- "name": "width",
210
- "type": "INT",
211
  "links": [
212
  4
213
  ],
214
  "slot_index": 0
215
- },
216
- {
217
- "name": "height",
218
- "type": "INT",
219
- "links": [
220
- 5
221
- ],
222
- "slot_index": 1
223
  }
224
  ],
225
  "properties": {
226
- "Node name": "GetImageSize"
227
  },
228
- "widgets_values": []
 
 
229
  },
230
  {
231
  "id": 5,
232
- "type": "ImageScale",
233
  "pos": [
234
- 850,
235
- 550
236
  ],
237
  "size": [
238
  210,
239
- 130
240
  ],
241
  "flags": {},
242
  "order": 4,
243
  "mode": 0,
244
  "inputs": [
245
  {
246
- "name": "image",
247
  "type": "IMAGE",
248
  "link": 3
249
  },
250
  {
251
- "name": "width",
252
- "type": "INT",
253
- "link": 4
254
- },
255
- {
256
- "name": "height",
257
- "type": "INT",
258
- "link": 5
259
  }
260
  ],
261
  "outputs": [
@@ -263,70 +340,57 @@
263
  "name": "IMAGE",
264
  "type": "IMAGE",
265
  "links": [
266
- 6
267
  ],
268
  "slot_index": 0
269
  }
270
  ],
271
  "properties": {
272
- "Node name": "ImageScale"
273
- },
274
- "widgets_values": [
275
- "lanczos",
276
- false
277
- ]
278
  },
279
  {
280
  "id": 6,
281
- "type": "ImageBatch",
282
  "pos": [
283
  1100,
284
- 550
285
  ],
286
  "size": [
287
- 210,
288
- 82
289
  ],
290
  "flags": {},
291
  "order": 5,
292
  "mode": 0,
293
  "inputs": [
294
  {
295
- "name": "image1",
296
- "type": "IMAGE",
297
- "link": 6
298
- },
299
- {
300
- "name": "image2",
301
- "type": "IMAGE",
302
- "link": null
303
- }
304
- ],
305
- "outputs": [
306
- {
307
- "name": "IMAGE",
308
  "type": "IMAGE",
309
- "links": [
310
- 7
311
- ],
312
- "slot_index": 0
313
  }
314
  ],
 
315
  "properties": {
316
- "Node name": "ImageBatch"
317
  },
318
- "widgets_values": []
 
 
 
 
 
319
  },
320
  {
321
  "id": 7,
322
- "type": "SaveVideo",
323
  "pos": [
324
- 1350,
325
- 550
326
  ],
327
  "size": [
328
  315,
329
- 130
330
  ],
331
  "flags": {},
332
  "order": 6,
@@ -335,58 +399,45 @@
335
  {
336
  "name": "images",
337
  "type": "IMAGE",
338
- "link": 7
339
- },
340
- {
341
- "name": "audio",
342
- "type": "AUDIO",
343
- "link": null
344
  }
345
  ],
346
  "outputs": [],
347
  "properties": {
348
- "Node name": "SaveVideo"
349
- },
350
- "widgets_values": [
351
- "face_swap_output",
352
- "mp4",
353
- 24,
354
- false
355
- ]
356
  },
357
  {
358
  "id": 8,
359
- "type": "PreviewImage",
360
  "pos": [
361
- 1100,
362
- 100
363
  ],
364
  "size": [
365
- 410,
366
- 410
367
  ],
368
  "flags": {},
369
  "order": 7,
370
  "mode": 0,
371
- "inputs": [
372
- {
373
- "name": "images",
374
- "type": "IMAGE",
375
- "link": 3
376
- }
377
- ],
378
  "outputs": [],
379
  "properties": {
380
- "Node name": "PreviewImage"
381
  },
382
- "widgets_values": []
 
 
 
 
383
  },
384
  {
385
  "id": 9,
386
- "type": "PrimitiveString",
387
  "pos": [
388
- 100,
389
- 800
390
  ],
391
  "size": [
392
  315,
@@ -398,169 +449,140 @@
398
  "inputs": [],
399
  "outputs": [
400
  {
401
- "name": "STRING",
402
- "type": "STRING",
403
  "links": [
404
- 8
405
  ],
406
  "slot_index": 0
407
  }
408
  ],
409
  "properties": {
410
- "Node name": "PrimitiveString"
411
  },
412
- "widgets_values": [
413
- "face_swap_app"
414
- ]
415
  },
416
  {
417
  "id": 10,
418
- "type": "Note",
419
  "pos": [
420
- -200,
421
- -150
422
  ],
423
  "size": [
424
- 410,
425
- 210
426
  ],
427
  "flags": {},
428
  "order": 9,
429
  "mode": 0,
430
- "inputs": [],
431
- "outputs": [],
432
- "properties": {},
433
- "widgets_values": [
434
- "Face Swap Application\n\nUpload a source image containing the face you want to swap.\nUpload a target video where the face will be swapped.\n\nThe application will automatically detect faces and swap them smoothly.\n\nOutput will be saved as MP4 video with the swapped faces."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
  ],
436
- "color": "#432",
437
- "bgcolor": "#653"
 
438
  },
439
  {
440
  "id": 11,
441
- "type": "ReActorLoadFaceModel",
442
  "pos": [
443
- 500,
444
- -100
445
  ],
446
  "size": [
447
- 315,
448
- 82
449
  ],
450
  "flags": {},
451
  "order": 10,
452
  "mode": 0,
453
  "inputs": [],
454
- "outputs": [
455
- {
456
- "name": "FACE_MODEL",
457
- "type": "FACE_MODEL",
458
- "links": [
459
- 9
460
- ],
461
- "slot_index": 0
462
- }
463
- ],
464
  "properties": {
465
- "Node name": "ReActorLoadFaceModel"
466
  },
467
- "widgets_values": [
468
- "inswapper_128_fp16.onnx"
469
- ]
 
 
470
  },
471
  {
472
  "id": 12,
473
- "type": "ReActorOptions",
474
  "pos": [
475
- 850,
476
- -100
477
  ],
478
  "size": [
479
- 315,
480
- 214
481
  ],
482
  "flags": {},
483
  "order": 11,
484
  "mode": 0,
485
- "inputs": [
486
- {
487
- "name": "face_model",
488
- "type": "FACE_MODEL",
489
- "link": 9
490
- }
491
- ],
492
  "outputs": [
493
  {
494
- "name": "OPTIONS",
495
- "type": "OPTIONS",
496
  "links": [
497
- 10
498
- ],
499
- "slot_index": 0
500
  }
501
  ],
 
502
  "properties": {
503
- "Node name": "ReActorOptions"
504
  },
505
- "widgets_values": [
506
- true,
507
- "Source Image 1",
508
- "all",
509
- "all",
510
- 0,
511
- 0,
512
- false,
513
- "None",
514
- "None",
515
- false,
516
- false,
517
- "0",
518
- "1",
519
- false,
520
- false,
521
- false,
522
- false,
523
- false,
524
- false,
525
- false,
526
- false,
527
- false,
528
- false,
529
- "None",
530
- "None",
531
- false,
532
- false
533
- ]
534
  },
535
  {
536
  "id": 13,
537
- "type": "ReActorFaceSwap",
538
  "pos": [
539
- 1200,
540
- 100
541
  ],
542
  "size": [
543
  315,
544
- 414
545
  ],
546
  "flags": {},
547
  "order": 12,
548
  "mode": 0,
549
  "inputs": [
550
  {
551
- "name": "source_image",
552
  "type": "IMAGE",
553
  "link": 1
554
- },
555
- {
556
- "name": "target_image",
557
- "type": "IMAGE",
558
- "link": 2
559
- },
560
- {
561
- "name": "options",
562
- "type": "OPTIONS",
563
- "link": 10
564
  }
565
  ],
566
  "outputs": [
@@ -568,1123 +590,290 @@
568
  "name": "IMAGE",
569
  "type": "IMAGE",
570
  "links": [
571
- 11
572
  ],
573
  "slot_index": 0
574
  }
575
  ],
576
  "properties": {
577
- "Node name": "ReActorFaceSwap"
578
  },
579
- "widgets_values": [
580
- true,
581
- 0,
582
- 1,
583
- "Source Image 1",
584
- "all",
585
- "all",
586
- "0",
587
- "0",
588
- false,
589
- "None",
590
- "None",
591
- false,
592
- false,
593
- "0",
594
- "1",
595
- false,
596
- false,
597
- false,
598
- false,
599
- false,
600
- false,
601
- false,
602
- false,
603
- false,
604
- false,
605
- "None",
606
- "None",
607
- false,
608
- false
609
- ]
610
  },
611
  {
612
  "id": 14,
613
- "type": "ImageScaleBy",
614
  "pos": [
615
- 1550,
616
- 550
617
  ],
618
  "size": [
619
- 210,
620
- 82
621
  ],
622
  "flags": {},
623
  "order": 13,
624
  "mode": 0,
625
- "inputs": [
626
- {
627
- "name": "image",
628
- "type": "IMAGE",
629
- "link": 11
630
- }
631
- ],
632
- "outputs": [
633
- {
634
- "name": "IMAGE",
635
- "type": "IMAGE",
636
- "links": [
637
- 12
638
- ],
639
- "slot_index": 0
640
- }
641
- ],
642
  "properties": {
643
- "Node name": "ImageScaleBy"
644
  },
645
- "widgets_values": [
646
- "lanczos",
647
- 1
648
- ]
 
649
  },
650
  {
651
  "id": 15,
652
- "type": "Reroute",
653
  "pos": [
654
- 1800,
655
- 550
656
- ],
657
- "size": [
658
- 110,
659
- 26
660
- ],
661
- "flags": {},
662
- "order": 14,
663
- "mode": 0,
664
- "inputs": [
665
- {
666
- "name": "",
667
- "type": "*",
668
- "link": 12
669
- }
670
- ],
671
- "outputs": [
672
- {
673
- "name": "IMAGE",
674
- "type": "IMAGE",
675
- "links": [
676
- 13
677
- ],
678
- "slot_index": 0
679
- }
680
- ],
681
- "properties": {
682
- "showOutputText": true,
683
- "horizontal": false
684
- },
685
- "widgets_values": [
686
- "IMAGE"
687
- ]
688
- },
689
- {
690
- "id": 16,
691
- "type": "SaveVideo",
692
- "pos": [
693
- 1950,
694
- 550
695
  ],
696
  "size": [
697
  315,
698
- 130
699
- ],
700
- "flags": {},
701
- "order": 15,
702
- "mode": 0,
703
- "inputs": [
704
- {
705
- "name": "images",
706
- "type": "IMAGE",
707
- "link": 13
708
- },
709
- {
710
- "name": "audio",
711
- "type": "AUDIO",
712
- "link": null
713
- }
714
- ],
715
- "outputs": [],
716
- "properties": {
717
- "Node name": "SaveVideo"
718
- },
719
- "widgets_values": [
720
- "face_swap_result",
721
- "mp4",
722
- 24,
723
- false
724
- ]
725
- },
726
- {
727
- "id": 17,
728
- "type": "PreviewImage",
729
- "pos": [
730
- 1550,
731
- 100
732
- ],
733
- "size": [
734
- 410,
735
- 410
736
- ],
737
- "flags": {},
738
- "order": 16,
739
- "mode": 0,
740
- "inputs": [
741
- {
742
- "name": "images",
743
- "type": "IMAGE",
744
- "link": 11
745
- }
746
- ],
747
- "outputs": [],
748
- "properties": {
749
- "Node name": "PreviewImage"
750
- },
751
- "widgets_values": []
752
- },
753
- {
754
- "id": 18,
755
- "type": "PrimitiveBoolean",
756
- "pos": [
757
- 850,
758
- 350
759
- ],
760
- "size": [
761
- 210,
762
- 58
763
  ],
764
  "flags": {},
765
- "order": 17,
766
  "mode": 0,
767
  "inputs": [],
768
  "outputs": [
769
  {
770
- "name": "BOOLEAN",
771
- "type": "BOOLEAN",
772
  "links": [
773
- 14
774
  ],
775
  "slot_index": 0
776
  }
777
  ],
778
  "properties": {
779
- "Node name": "PrimitiveBoolean"
780
  },
781
- "widgets_values": [
782
- true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  ]
784
  },
785
  {
786
- "id": 19,
787
- "type": "PrimitiveFloat",
788
  "pos": [
789
- 850,
790
- 450
791
- ],
792
- "size": [
793
- 210,
794
- 58
795
- ],
796
- "flags": {},
797
- "order": 18,
798
- "mode": 0,
799
- "inputs": [],
800
- "outputs": [
801
- {
802
- "name": "FLOAT",
803
- "type": "FLOAT",
804
- "links": [
805
- 15
806
- ],
807
- "slot_index": 0
808
- }
809
  ],
810
- "properties": {
811
- "Node name": "PrimitiveFloat"
812
- },
813
- "widgets_values": [
814
- 1
 
815
  ]
816
  },
817
  {
818
- "id": 20,
819
- "type": "PrimitiveInt",
820
  "pos": [
821
- 850,
 
 
822
  500
823
  ],
824
- "size": [
825
- 210,
826
- 58
827
- ],
828
- "flags": {},
829
- "order": 19,
830
- "mode": 0,
831
- "inputs": [],
832
- "outputs": [
833
- {
834
- "name": "INT",
835
- "type": "INT",
836
- "link": null
837
- }
838
- ],
839
- "properties": {
840
- "Node name": "PrimitiveInt"
841
- },
842
- "widgets_values": [
843
- 0
844
- ]
845
- },
846
- {
847
- "id": 21,
848
- "type": "Note",
849
- "pos": [
850
- -200,
851
- 800
852
- ],
853
- "size": [
854
- 410,
855
- 150
856
- ],
857
- "flags": {},
858
- "order": 20,
859
- "mode": 0,
860
- "inputs": [],
861
- "outputs": [],
862
- "properties": {},
863
- "widgets_values": [
864
- "APP Mode Configuration\n\nThis workflow is designed for APP mode.\nConfigure the input widgets for easy access.\n\nSource Image: Face to swap\nTarget Video: Video to apply face swap\nOutput: MP4 video with swapped faces"
865
- ],
866
- "color": "#234",
867
- "bgcolor": "#345"
868
- },
869
- {
870
- "id": 22,
871
- "type": "LoadImage",
872
- "pos": [
873
- 100,
874
- 100
875
- ],
876
- "size": [
877
- 315,
878
- 314
879
- ],
880
- "flags": {},
881
- "order": 21,
882
- "mode": 0,
883
- "inputs": [],
884
- "outputs": [
885
- {
886
- "name": "IMAGE",
887
- "type": "IMAGE",
888
- "links": [
889
- 16
890
- ],
891
- "slot_index": 0
892
- },
893
- {
894
- "name": "MASK",
895
- "type": "MASK",
896
- "links": null
897
- }
898
- ],
899
- "properties": {
900
- "Node name": "LoadImage"
901
- },
902
- "widgets_values": [
903
- "source_face.png",
904
- "image"
905
- ]
906
- },
907
- {
908
- "id": 23,
909
- "type": "LoadVideo",
910
- "pos": [
911
- 100,
912
- 450
913
- ],
914
- "size": [
915
- 315,
916
- 294
917
- ],
918
- "flags": {},
919
- "order": 22,
920
- "mode": 0,
921
- "inputs": [],
922
- "outputs": [
923
- {
924
- "name": "IMAGE",
925
- "type": "IMAGE",
926
- "links": [
927
- 17
928
- ],
929
- "slot_index": 0
930
- },
931
- {
932
- "name": "AUDIO",
933
- "type": "AUDIO",
934
- "links": [
935
- 18
936
- ],
937
- "slot_index": 1
938
- },
939
- {
940
- "name": "frame_rate",
941
- "type": "FLOAT",
942
- "links": null
943
- },
944
- {
945
- "name": "frame_count",
946
- "type": "INT",
947
- "links": null
948
- }
949
- ],
950
- "properties": {
951
- "Node name": "LoadVideo"
952
- },
953
- "widgets_values": [
954
- "target_video.mp4",
955
- "video"
956
  ]
957
- },
958
- {
959
- "id": 24,
960
- "type": "ReActorFaceSwap",
961
- "pos": [
962
- 500,
963
- 100
964
- ],
965
- "size": [
966
- 315,
967
- 414
968
- ],
969
- "flags": {},
970
- "order": 23,
971
- "mode": 0,
972
- "inputs": [
973
- {
974
- "name": "source_image",
975
- "type": "IMAGE",
976
- "link": 16
977
- },
978
- {
979
- "name": "target_image",
980
- "type": "IMAGE",
981
- "link": 17
982
- }
983
- ],
984
- "outputs": [
985
- {
986
- "name": "IMAGE",
987
- "type": "IMAGE",
988
- "links": [
989
- 19
990
- ],
991
- "slot_index": 0
992
- }
993
- ],
994
- "properties": {
995
- "Node name": "ReActorFaceSwap"
996
- },
997
- "widgets_values": [
998
- true,
999
  0,
1000
- 1,
1001
- "Source Image 1",
1002
- "all",
1003
- "all",
1004
- "0",
1005
- "0",
1006
- false,
1007
- "None",
1008
- "None",
1009
- false,
1010
- false,
1011
- "0",
1012
- "1",
1013
- false,
1014
- false,
1015
- false,
1016
- false,
1017
- false,
1018
- false,
1019
- false,
1020
- false,
1021
- false,
1022
- false,
1023
- "None",
1024
- "None",
1025
- false,
1026
- false
1027
  ]
1028
- },
1029
- {
1030
- "id": 25,
1031
- "type": "GetImageSize",
1032
- "pos": [
1033
- 500,
1034
- 550
1035
- ],
1036
- "size": [
1037
- 210,
1038
- 82
1039
- ],
1040
- "flags": {},
1041
- "order": 24,
1042
- "mode": 0,
1043
- "inputs": [
1044
- {
1045
- "name": "image",
1046
- "type": "IMAGE",
1047
- "link": 17
1048
- }
1049
- ],
1050
- "outputs": [
1051
- {
1052
- "name": "width",
1053
- "type": "INT",
1054
- "links": [
1055
- 20
1056
- ],
1057
- "slot_index": 0
1058
- },
1059
- {
1060
- "name": "height",
1061
- "type": "INT",
1062
- "links": [
1063
- 21
1064
- ],
1065
- "slot_index": 1
1066
- }
1067
- ],
1068
- "properties": {
1069
- "Node name": "GetImageSize"
1070
- },
1071
- "widgets_values": []
1072
- },
1073
- {
1074
- "id": 26,
1075
- "type": "ImageScale",
1076
- "pos": [
1077
- 850,
1078
- 550
1079
- ],
1080
- "size": [
1081
- 210,
1082
- 130
1083
- ],
1084
- "flags": {},
1085
- "order": 25,
1086
- "mode": 0,
1087
- "inputs": [
1088
- {
1089
- "name": "image",
1090
- "type": "IMAGE",
1091
- "link": 19
1092
- },
1093
- {
1094
- "name": "width",
1095
- "type": "INT",
1096
- "link": 20
1097
- },
1098
- {
1099
- "name": "height",
1100
- "type": "INT",
1101
- "link": 21
1102
- }
1103
- ],
1104
- "outputs": [
1105
- {
1106
- "name": "IMAGE",
1107
- "type": "IMAGE",
1108
- "links": [
1109
- 22
1110
- ],
1111
- "slot_index": 0
1112
- }
1113
- ],
1114
- "properties": {
1115
- "Node name": "ImageScale"
1116
- },
1117
- "widgets_values": [
1118
- "lanczos",
1119
- false
1120
- ]
1121
- },
1122
- {
1123
- "id": 27,
1124
- "type": "SaveVideo",
1125
- "pos": [
1126
- 1100,
1127
- 550
1128
- ],
1129
- "size": [
1130
- 315,
1131
- 130
1132
- ],
1133
- "flags": {},
1134
- "order": 26,
1135
- "mode": 0,
1136
- "inputs": [
1137
- {
1138
- "name": "images",
1139
- "type": "IMAGE",
1140
- "link": 22
1141
- },
1142
- {
1143
- "name": "audio",
1144
- "type": "AUDIO",
1145
- "link": 18
1146
- }
1147
- ],
1148
- "outputs": [],
1149
- "properties": {
1150
- "Node name": "SaveVideo"
1151
- },
1152
- "widgets_values": [
1153
- "face_swap_output",
1154
- "mp4",
1155
- 24,
1156
- false
1157
- ]
1158
- },
1159
- {
1160
- "id": 28,
1161
- "type": "PreviewImage",
1162
- "pos": [
1163
- 850,
1164
- 100
1165
- ],
1166
- "size": [
1167
- 410,
1168
- 410
1169
- ],
1170
- "flags": {},
1171
- "order": 27,
1172
- "mode": 0,
1173
- "inputs": [
1174
- {
1175
- "name": "images",
1176
- "type": "IMAGE",
1177
- "link": 19
1178
- }
1179
- ],
1180
- "outputs": [],
1181
- "properties": {
1182
- "Node name": "PreviewImage"
1183
- },
1184
- "widgets_values": []
1185
- },
1186
- {
1187
- "id": 29,
1188
- "type": "Note",
1189
- "pos": [
1190
- -200,
1191
- -150
1192
- ],
1193
- "size": [
1194
- 410,
1195
- 210
1196
- ],
1197
- "flags": {},
1198
- "order": 28,
1199
- "mode": 0,
1200
- "inputs": [],
1201
- "outputs": [],
1202
- "properties": {},
1203
- "widgets_values": [
1204
- "🎭 Face Swap Application\n\nUpload a source image containing the face you want to swap.\nUpload a target video where the face will be swapped.\n\nThe application will automatically detect faces and swap them smoothly.\n\nOutput will be saved as MP4 video with the swapped faces.\n\nBuilt with anycoder - https://huggingface.co/spaces/akhaliq/anycoder"
1205
- ],
1206
- "color": "#432",
1207
- "bgcolor": "#653"
1208
- },
1209
- {
1210
- "id": 30,
1211
- "type": "ReActorLoadFaceModel",
1212
- "pos": [
1213
- 500,
1214
- -100
1215
- ],
1216
- "size": [
1217
- 315,
1218
- 82
1219
- ],
1220
- "flags": {},
1221
- "order": 29,
1222
- "mode": 0,
1223
- "inputs": [],
1224
- "outputs": [
1225
- {
1226
- "name": "FACE_MODEL",
1227
- "type": "FACE_MODEL",
1228
- "links": [
1229
- 23
1230
- ],
1231
- "slot_index": 0
1232
- }
1233
- ],
1234
- "properties": {
1235
- "Node name": "ReActorLoadFaceModel"
1236
- },
1237
- "widgets_values": [
1238
- "inswapper_128_fp16.onnx"
1239
- ]
1240
- },
1241
- {
1242
- "id": 31,
1243
- "type": "ReActorOptions",
1244
- "pos": [
1245
- 850,
1246
- -100
1247
- ],
1248
- "size": [
1249
- 315,
1250
- 214
1251
- ],
1252
- "flags": {},
1253
- "order": 30,
1254
- "mode": 0,
1255
- "inputs": [
1256
- {
1257
- "name": "face_model",
1258
- "type": "FACE_MODEL",
1259
- "link": 23
1260
- }
1261
- ],
1262
- "outputs": [
1263
- {
1264
- "name": "OPTIONS",
1265
- "type": "OPTIONS",
1266
- "links": [
1267
- 24
1268
- ],
1269
- "slot_index": 0
1270
- }
1271
- ],
1272
- "properties": {
1273
- "Node name": "ReActorOptions"
1274
- },
1275
- "widgets_values": [
1276
- true,
1277
- "Source Image 1",
1278
- "all",
1279
- "all",
1280
- 0,
1281
- 0,
1282
- false,
1283
- "None",
1284
- "None",
1285
- false,
1286
- false,
1287
- "0",
1288
- "1",
1289
- false,
1290
- false,
1291
- false,
1292
- false,
1293
- false,
1294
- false,
1295
- false,
1296
- false,
1297
- false,
1298
- false,
1299
- false,
1300
- false,
1301
- "None",
1302
- "None",
1303
- false,
1304
- false
1305
- ]
1306
- },
1307
- {
1308
- "id": 32,
1309
- "type": "ReActorFaceSwap",
1310
- "pos": [
1311
- 1200,
1312
- 100
1313
- ],
1314
- "size": [
1315
- 315,
1316
- 414
1317
- ],
1318
- "flags": {},
1319
- "order": 31,
1320
- "mode": 0,
1321
- "inputs": [
1322
- {
1323
- "name": "source_image",
1324
- "type": "IMAGE",
1325
- "link": 16
1326
- },
1327
- {
1328
- "name": "target_image",
1329
- "type": "IMAGE",
1330
- "link": 17
1331
- },
1332
- {
1333
- "name": "options",
1334
- "type": "OPTIONS",
1335
- "link": 24
1336
- }
1337
- ],
1338
- "outputs": [
1339
- {
1340
- "name": "IMAGE",
1341
- "type": "IMAGE",
1342
- "links": [
1343
- 25
1344
- ],
1345
- "slot_index": 0
1346
- }
1347
- ],
1348
- "properties": {
1349
- "Node name": "ReActorFaceSwap"
1350
- },
1351
- "widgets_values": [
1352
- true,
1353
- 0,
1354
- 1,
1355
- "Source Image 1",
1356
- "all",
1357
- "all",
1358
- "0",
1359
- "0",
1360
- false,
1361
- "None",
1362
- "None",
1363
- false,
1364
- false,
1365
- "0",
1366
- "1",
1367
- false,
1368
- false,
1369
- false,
1370
- false,
1371
- false,
1372
- false,
1373
- false,
1374
- false,
1375
- false,
1376
- false,
1377
- "None",
1378
- "None",
1379
- false,
1380
- false
1381
- ]
1382
- },
1383
- {
1384
- "id": 33,
1385
- "type": "ImageScaleBy",
1386
- "pos": [
1387
- 1550,
1388
- 550
1389
- ],
1390
- "size": [
1391
- 210,
1392
- 82
1393
- ],
1394
- "flags": {},
1395
- "order": 32,
1396
- "mode": 0,
1397
- "inputs": [
1398
- {
1399
- "name": "image",
1400
- "type": "IMAGE",
1401
- "link": 25
1402
- }
1403
- ],
1404
- "outputs": [
1405
- {
1406
- "name": "IMAGE",
1407
- "type": "IMAGE",
1408
- "links": [
1409
- 26
1410
- ],
1411
- "slot_index": 0
1412
- }
1413
- ],
1414
- "properties": {
1415
- "Node name": "ImageScaleBy"
1416
- },
1417
- "widgets_values": [
1418
- "lanczos",
1419
- 1
1420
- ]
1421
- },
1422
- {
1423
- "id": 34,
1424
- "type": "SaveVideo",
1425
- "pos": [
1426
- 1800,
1427
- 550
1428
- ],
1429
- "size": [
1430
- 315,
1431
- 130
1432
- ],
1433
- "flags": {},
1434
- "order": 33,
1435
- "mode": 0,
1436
- "inputs": [
1437
- {
1438
- "name": "images",
1439
- "type": "IMAGE",
1440
- "link": 26
1441
- },
1442
- {
1443
- "name": "audio",
1444
- "type": "AUDIO",
1445
- "link": null
1446
- }
1447
- ],
1448
- "outputs": [],
1449
- "properties": {
1450
- "Node name": "SaveVideo"
1451
- },
1452
- "widgets_values": [
1453
- "face_swap_result",
1454
- "mp4",
1455
- 24,
1456
- false
1457
- ]
1458
- },
1459
- {
1460
- "id": 35,
1461
- "type": "PreviewImage",
1462
- "pos": [
1463
- 1550,
1464
- 100
1465
- ],
1466
- "size": [
1467
- 410,
1468
- 410
1469
- ],
1470
- "flags": {},
1471
- "order": 34,
1472
- "mode": 0,
1473
- "inputs": [
1474
- {
1475
- "name": "images",
1476
- "type": "IMAGE",
1477
- "link": 25
1478
- }
1479
- ],
1480
- "outputs": [],
1481
- "properties": {
1482
- "Node name": "PreviewImage"
1483
- },
1484
- "widgets_values": []
1485
- },
1486
- {
1487
- "id": 36,
1488
- "type": "PrimitiveBoolean",
1489
- "pos": [
1490
- 850,
1491
- 350
1492
- ],
1493
- "size": [
1494
- 210,
1495
- 58
1496
- ],
1497
- "flags": {},
1498
- "order": 35,
1499
- "mode": 0,
1500
- "inputs": [],
1501
- "outputs": [
1502
- {
1503
- "name": "BOOLEAN",
1504
- "type": "BOOLEAN",
1505
- "links": null
1506
- }
1507
- ],
1508
- "properties": {
1509
- "Node name": "PrimitiveBoolean"
1510
- },
1511
- "widgets_values": [
1512
- true
1513
- ]
1514
- },
1515
- {
1516
- "id": 37,
1517
- "type": "PrimitiveFloat",
1518
- "pos": [
1519
- 850,
1520
- 450
1521
- ],
1522
- "size": [
1523
- 210,
1524
- 58
1525
- ],
1526
- "flags": {},
1527
- "order": 36,
1528
- "mode": 0,
1529
- "inputs": [],
1530
- "outputs": [
1531
- {
1532
- "name": "FLOAT",
1533
- "type": "FLOAT",
1534
- "links": null
1535
- }
1536
- ],
1537
- "properties": {
1538
- "Node name": "PrimitiveFloat"
1539
- },
1540
- "widgets_values": [
1541
- 1
1542
- ]
1543
- },
1544
- {
1545
- "id": 38,
1546
- "type": "PrimitiveInt",
1547
- "pos": [
1548
- 850,
1549
- 500
1550
- ],
1551
- "size": [
1552
- 210,
1553
- 58
1554
- ],
1555
- "flags": {},
1556
- "order": 37,
1557
- "mode": 0,
1558
- "inputs": [],
1559
- "outputs": [
1560
- {
1561
- "name": "INT",
1562
- "type": "INT",
1563
- "links": null
1564
- }
1565
- ],
1566
- "properties": {
1567
- "Node name": "PrimitiveInt"
1568
- },
1569
- "widgets_values": [
1570
- 0
1571
- ]
1572
- },
1573
- {
1574
- "id": 39,
1575
- "type": "Note",
1576
- "pos": [
1577
- -200,
1578
- 800
1579
- ],
1580
- "size": [
1581
- 410,
1582
- 150
1583
- ],
1584
- "flags": {},
1585
- "order": 38,
1586
- "mode": 0,
1587
- "inputs": [],
1588
- "outputs": [],
1589
- "properties": {},
1590
- "widgets_values": [
1591
- "APP Mode Configuration\n\nThis workflow is designed for APP mode.\nConfigure the input widgets for easy access.\n\nSource Image: Face to swap\nTarget Video: Video to apply face swap\nOutput: MP4 video with swapped faces"
1592
- ],
1593
- "color": "#234",
1594
- "bgcolor": "#345"
1595
- },
1596
- {
1597
- "id": 40,
1598
- "type": "LoadImage",
1599
- "pos": [
1600
- 100,
1601
- 100
1602
- ],
1603
- "size": [
1604
- 315,
1605
- 314
1606
- ],
1607
- "flags": {
1608
- "collapsed": false
1609
- },
1610
- "order": 39,
1611
- "mode": 0,
1612
- "inputs": [],
1613
- "outputs": [
1614
- {
1615
- "name": "IMAGE",
1616
- "type": "IMAGE",
1617
- "links": [
1618
- 45
1619
- ],
1620
- "slot_index": 0
1621
- },
1622
- {
1623
- "name": "MASK",
1624
- "type": "MASK",
1625
- "links": null
1626
- }
1627
- ],
1628
- "properties": {
1629
- "Node name": "LoadImage"
1630
- },
1631
- "widgets_values": [
1632
- "source_face.png",
1633
- "image"
1634
- ]
1635
- },
1636
- {
1637
- "id": 41,
1638
- "type": "LoadVideo",
1639
- "pos": [
1640
- 100,
1641
- 450
1642
- ],
1643
- "size": [
1644
- 315,
1645
- 294
1646
- ],
1647
- "flags": {},
1648
- "order": 40,
1649
- "mode": 0,
1650
- "inputs": [],
1651
- "outputs": [
1652
- {
1653
- "name": "IMAGE",
1654
- "type": "IMAGE",
1655
- "links": [
1656
- 46
1657
- ],
1658
- "slot_index": 0
1659
- },
1660
- {
1661
- "name": "AUDIO",
1662
- "type": "AUDIO",
1663
- "links": [
1664
- 47
1665
- ],
1666
- "slot_index": 1
1667
- },
1668
- {
1669
- "name": "frame_rate",
1670
- "type": "FLOAT",
1671
- "links": null
1672
- },
1673
- {
1674
- "name": "frame_count",
1675
- "type": "INT",
1676
- "links": null
1677
- }
1678
- ],
1679
- "properties": {
1680
- "Node name": "LoadVideo"
1681
- },
1682
- "widgets_values": [
1683
- "target_video.mp4",
1684
- "video"
1685
- ]
1686
- },
1687
- {
1688
- "id": 42,</pre>
1689
  </body>
1690
  </html>
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>ComfyUI Workflow</title>
7
  <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
  body {
14
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
15
  background-color: #000000;
16
  color: #f5f5f7;
17
+ line-height: 1.6;
18
+ padding: 20px;
19
+ min-height: 100vh;
20
+ }
21
+ .container {
22
+ max-width: 1200px;
23
+ margin: 0 auto;
24
+ }
25
+ .header {
26
+ text-align: center;
27
+ margin-bottom: 40px;
28
+ padding: 40px 20px;
29
+ }
30
+ .header h1 {
31
+ font-size: 48px;
32
+ font-weight: 600;
33
+ color: #ffffff;
34
+ margin-bottom: 12px;
35
+ letter-spacing: -0.02em;
36
+ }
37
+ .header p {
38
+ font-size: 18px;
39
+ color: #86868b;
40
+ font-weight: 400;
41
+ }
42
+ .controls {
43
+ display: flex;
44
+ gap: 12px;
45
+ margin-bottom: 24px;
46
+ justify-content: center;
47
+ }
48
+ .btn {
49
+ padding: 12px 24px;
50
+ border: none;
51
+ border-radius: 24px;
52
+ font-size: 14px;
53
+ font-weight: 500;
54
+ cursor: pointer;
55
+ transition: all 0.2s;
56
+ font-family: inherit;
57
+ }
58
+ .btn-primary {
59
+ background: #ffffff;
60
+ color: #000000;
61
+ }
62
+ .btn-primary:hover {
63
+ background: #f5f5f7;
64
+ transform: scale(0.98);
65
+ }
66
+ .btn-secondary {
67
  background: #1d1d1f;
68
+ color: #f5f5f7;
69
+ border: 1px solid #424245;
70
+ }
71
+ .btn-secondary:hover {
72
+ background: #2d2d2f;
73
+ transform: scale(0.98);
74
+ }
75
+ .json-container {
76
+ background-color: #1d1d1f;
77
+ border-radius: 16px;
78
+ padding: 32px;
79
  overflow-x: auto;
80
+ border: 1px solid #424245;
81
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
82
+ }
83
+ pre {
84
+ margin: 0;
85
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
86
+ font-size: 13px;
87
+ line-height: 1.6;
88
+ white-space: pre-wrap;
89
+ word-wrap: break-word;
90
+ }
91
+ .json-key {
92
+ color: #9cdcfe;
93
+ }
94
+ .json-string {
95
+ color: #ce9178;
96
+ }
97
+ .json-number {
98
+ color: #b5cea8;
99
+ }
100
+ .json-boolean {
101
+ color: #569cd6;
102
+ }
103
+ .json-null {
104
+ color: #569cd6;
105
+ }
106
+ .success {
107
+ color: #30d158;
108
+ }
109
+ @media (max-width: 768px) {
110
+ .header h1 {
111
+ font-size: 32px;
112
+ }
113
+ .controls {
114
+ flex-direction: column;
115
+ }
116
+ .json-container {
117
+ padding: 20px;
118
+ }
119
  }
120
  </style>
121
  </head>
122
  <body>
123
+ <div class="container">
124
+ <div class="header">
125
+ <h1>ComfyUI Workflow</h1>
126
+ <p>View and download your workflow JSON</p>
127
+ </div>
128
+
129
+ <div class="controls">
130
+ <button class="btn btn-primary" onclick="downloadJSON()">Download JSON</button>
131
+ <button class="btn btn-secondary" onclick="copyToClipboard()">Copy to Clipboard</button>
132
+ </div>
133
+
134
+ <div class="json-container">
135
+ <pre id="json-content">{
136
  "last_node_id": 45,
137
  "last_link_id": 58,
138
  "nodes": [
 
169
  "properties": {
170
  "Node name": "LoadImage"
171
  },
172
+ "widgets_values": {
173
+ "image": "source_face.png",
174
+ "upload": "image"
175
+ }
176
  },
177
  {
178
  "id": 2,
 
183
  ],
184
  "size": [
185
  315,
186
+ 250
187
  ],
188
  "flags": {},
189
  "order": 1,
 
199
  "slot_index": 0
200
  },
201
  {
202
+ "name": "FLOAT",
 
 
 
 
 
203
  "type": "FLOAT",
204
  "links": null
 
 
 
 
 
205
  }
206
  ],
207
  "properties": {
208
  "Node name": "LoadVideo"
209
  },
210
+ "widgets_values": {
211
+ "video": "target_video.mp4",
212
+ "force_rate": 0,
213
+ "custom_width": 0,
214
+ "custom_height": 0,
215
+ "frame_load_cap": 0,
216
+ "skip_first_frames": 0,
217
+ "select_every_nth": 1
218
+ }
219
  },
220
  {
221
  "id": 3,
222
  "type": "ReActorFaceSwap",
223
  "pos": [
224
+ 450,
225
  100
226
  ],
227
  "size": [
228
  315,
229
+ 420
230
  ],
231
  "flags": {},
232
+ "order": 3,
233
  "mode": 0,
234
  "inputs": [
235
  {
 
241
  "name": "target_image",
242
  "type": "IMAGE",
243
  "link": 2
244
+ },
245
+ {
246
+ "name": "face_model",
247
+ "type": "FACE_MODEL",
248
+ "link": null
249
  }
250
  ],
251
  "outputs": [
 
261
  "properties": {
262
  "Node name": "ReActorFaceSwap"
263
  },
264
+ "widgets_values": {
265
+ "enabled": true,
266
+ "save_original": false,
267
+ "code_form": 0,
268
+ "face_restore_model": "GFPGAN_1.4.pth",
269
+ "face_restore_visibility": 1,
270
+ "code_restorer_visibility": 1,
271
+ "detect_gender_input": "no",
272
+ "detect_gender_source": "no",
273
+ "input_faces_index": "0",
274
+ "source_faces_index": "0",
275
+ "faces_index": "0",
276
+ "threshold": 0.5,
277
+ "max_faces": 10
278
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  },
280
  {
281
  "id": 4,
282
+ "type": "FaceAnalysis",
283
  "pos": [
284
+ 450,
285
  550
286
  ],
287
  "size": [
288
+ 315,
289
+ 180
290
  ],
291
  "flags": {},
292
+ "order": 2,
293
  "mode": 0,
294
+ "inputs": [],
 
 
 
 
 
 
295
  "outputs": [
296
  {
297
+ "name": "FACE_MODEL",
298
+ "type": "FACE_MODEL",
299
  "links": [
300
  4
301
  ],
302
  "slot_index": 0
 
 
 
 
 
 
 
 
303
  }
304
  ],
305
  "properties": {
306
+ "Node name": "FaceAnalysis"
307
  },
308
+ "widgets_values": {
309
+ "provider": "CUDA"
310
+ }
311
  },
312
  {
313
  "id": 5,
314
+ "type": "ImageBatch",
315
  "pos": [
316
+ 800,
317
+ 100
318
  ],
319
  "size": [
320
  210,
321
+ 46
322
  ],
323
  "flags": {},
324
  "order": 4,
325
  "mode": 0,
326
  "inputs": [
327
  {
328
+ "name": "image1",
329
  "type": "IMAGE",
330
  "link": 3
331
  },
332
  {
333
+ "name": "image2",
334
+ "type": "IMAGE",
335
+ "link": null
 
 
 
 
 
336
  }
337
  ],
338
  "outputs": [
 
340
  "name": "IMAGE",
341
  "type": "IMAGE",
342
  "links": [
343
+ 5
344
  ],
345
  "slot_index": 0
346
  }
347
  ],
348
  "properties": {
349
+ "Node name": "ImageBatch"
350
+ }
 
 
 
 
351
  },
352
  {
353
  "id": 6,
354
+ "type": "SaveVideo",
355
  "pos": [
356
  1100,
357
+ 100
358
  ],
359
  "size": [
360
+ 315,
361
+ 280
362
  ],
363
  "flags": {},
364
  "order": 5,
365
  "mode": 0,
366
  "inputs": [
367
  {
368
+ "name": "images",
 
 
 
 
 
 
 
 
 
 
 
 
369
  "type": "IMAGE",
370
+ "link": 5
 
 
 
371
  }
372
  ],
373
+ "outputs": [],
374
  "properties": {
375
+ "Node name": "SaveVideo"
376
  },
377
+ "widgets_values": {
378
+ "filename_prefix": "face_swapped_video",
379
+ "format": "video/h264-mp4",
380
+ "crf": 22,
381
+ "save_metadata": true
382
+ }
383
  },
384
  {
385
  "id": 7,
386
+ "type": "PreviewImage",
387
  "pos": [
388
+ 800,
389
+ 200
390
  ],
391
  "size": [
392
  315,
393
+ 270
394
  ],
395
  "flags": {},
396
  "order": 6,
 
399
  {
400
  "name": "images",
401
  "type": "IMAGE",
402
+ "link": 5
 
 
 
 
 
403
  }
404
  ],
405
  "outputs": [],
406
  "properties": {
407
+ "Node name": "PreviewImage"
408
+ }
 
 
 
 
 
 
409
  },
410
  {
411
  "id": 8,
412
+ "type": "Note",
413
  "pos": [
414
+ 100,
415
+ 750
416
  ],
417
  "size": [
418
+ 350,
419
+ 180
420
  ],
421
  "flags": {},
422
  "order": 7,
423
  "mode": 0,
424
+ "inputs": [],
 
 
 
 
 
 
425
  "outputs": [],
426
  "properties": {
427
+ "Node name": "Note"
428
  },
429
+ "widgets_values": {
430
+ "text": "Face Swap Video Application\n\n1. Load source face image (person whose face you want to use)\n2. Load target video (person whose face will be replaced)\n3. Face swap will process each frame automatically\n4. Preview results and save final video\n\nFor better quality:\n- Use high resolution source images\n- Adjust threshold for face detection\n- Enable face restoration for better results",
431
+ "color": "#432",
432
+ "bgcolor": "#653"
433
+ }
434
  },
435
  {
436
  "id": 9,
437
+ "type": "ReActorLoadFaceModel",
438
  "pos": [
439
+ 450,
440
+ 750
441
  ],
442
  "size": [
443
  315,
 
449
  "inputs": [],
450
  "outputs": [
451
  {
452
+ "name": "FACE_MODEL",
453
+ "type": "FACE_MODEL",
454
  "links": [
455
+ 6
456
  ],
457
  "slot_index": 0
458
  }
459
  ],
460
  "properties": {
461
+ "Node name": "ReActorLoadFaceModel"
462
  },
463
+ "widgets_values": {
464
+ "face_model": "insightface"
465
+ }
466
  },
467
  {
468
  "id": 10,
469
+ "type": "GetImageSize",
470
  "pos": [
471
+ 800,
472
+ 500
473
  ],
474
  "size": [
475
+ 210,
476
+ 86
477
  ],
478
  "flags": {},
479
  "order": 9,
480
  "mode": 0,
481
+ "inputs": [
482
+ {
483
+ "name": "image",
484
+ "type": "IMAGE",
485
+ "link": 5
486
+ }
487
+ ],
488
+ "outputs": [
489
+ {
490
+ "name": "width",
491
+ "type": "INT",
492
+ "links": null
493
+ },
494
+ {
495
+ "name": "height",
496
+ "type": "INT",
497
+ "links": null
498
+ },
499
+ {
500
+ "name": "count",
501
+ "type": "INT",
502
+ "links": null
503
+ }
504
  ],
505
+ "properties": {
506
+ "Node name": "GetImageSize"
507
+ }
508
  },
509
  {
510
  "id": 11,
511
+ "type": "Note",
512
  "pos": [
513
+ 1100,
514
+ 450
515
  ],
516
  "size": [
517
+ 350,
518
+ 150
519
  ],
520
  "flags": {},
521
  "order": 10,
522
  "mode": 0,
523
  "inputs": [],
524
+ "outputs": [],
 
 
 
 
 
 
 
 
 
525
  "properties": {
526
+ "Node name": "Note"
527
  },
528
+ "widgets_values": {
529
+ "text": "Output Settings:\n\nFormat: MP4 (H264)\nCRF: 22 (quality level, lower = better)\nMetadata: Saved with video\n\nThe video will be saved frame-by-frame with face swapping applied to each frame for smooth, consistent results.",
530
+ "color": "#234",
531
+ "bgcolor": "#345"
532
+ }
533
  },
534
  {
535
  "id": 12,
536
+ "type": "PrimitiveNode",
537
  "pos": [
538
+ 100,
539
+ 850
540
  ],
541
  "size": [
542
+ 210,
543
+ 82
544
  ],
545
  "flags": {},
546
  "order": 11,
547
  "mode": 0,
548
+ "inputs": [],
 
 
 
 
 
 
549
  "outputs": [
550
  {
551
+ "name": "INT",
552
+ "type": "INT",
553
  "links": [
554
+ 7
555
+ ]
 
556
  }
557
  ],
558
+ "title": "Frame Load Cap",
559
  "properties": {
560
+ "Node name": "PrimitiveNode"
561
  },
562
+ "widgets_values": {
563
+ "value": 0,
564
+ "mode": "fixed"
565
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  },
567
  {
568
  "id": 13,
569
+ "type": "ImageScale",
570
  "pos": [
571
+ 450,
572
+ 850
573
  ],
574
  "size": [
575
  315,
576
+ 130
577
  ],
578
  "flags": {},
579
  "order": 12,
580
  "mode": 0,
581
  "inputs": [
582
  {
583
+ "name": "image",
584
  "type": "IMAGE",
585
  "link": 1
 
 
 
 
 
 
 
 
 
 
586
  }
587
  ],
588
  "outputs": [
 
590
  "name": "IMAGE",
591
  "type": "IMAGE",
592
  "links": [
593
+ 8
594
  ],
595
  "slot_index": 0
596
  }
597
  ],
598
  "properties": {
599
+ "Node name": "ImageScale"
600
  },
601
+ "widgets_values": {
602
+ "upscale_method": "cosine",
603
+ "width": 512,
604
+ "height": 512,
605
+ "crop": "center"
606
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
607
  },
608
  {
609
  "id": 14,
610
+ "type": "Note",
611
  "pos": [
612
+ 800,
613
+ 600
614
  ],
615
  "size": [
616
+ 300,
617
+ 120
618
  ],
619
  "flags": {},
620
  "order": 13,
621
  "mode": 0,
622
+ "inputs": [],
623
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  "properties": {
625
+ "Node name": "Note"
626
  },
627
+ "widgets_values": {
628
+ "text": "Face Detection Settings:\n\nThreshold: 0.5 (confidence level)\nMax Faces: 10 (detect multiple faces)\nFace Index: 0 (first detected face)\n\nAdjust these for different scenarios.",
629
+ "color": "#324",
630
+ "bgcolor": "#435"
631
+ }
632
  },
633
  {
634
  "id": 15,
635
+ "type": "ReActorOptions",
636
  "pos": [
637
+ 800,
638
+ 750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  ],
640
  "size": [
641
  315,
642
+ 180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  ],
644
  "flags": {},
645
+ "order": 14,
646
  "mode": 0,
647
  "inputs": [],
648
  "outputs": [
649
  {
650
+ "name": "OPTIONS",
651
+ "type": "OPTIONS",
652
  "links": [
653
+ 9
654
  ],
655
  "slot_index": 0
656
  }
657
  ],
658
  "properties": {
659
+ "Node name": "ReActorOptions"
660
  },
661
+ "widgets_values": {
662
+ "save_original": false,
663
+ "do_upscale": false,
664
+ "upscaler": "None",
665
+ "upscale_visibility": 1,
666
+ "face_restore_model": "GFPGAN_1.4.pth",
667
+ "face_restore_visibility": 1,
668
+ "code_restorer": "CodeFormer",
669
+ "code_restorer_visibility": 1,
670
+ "swap_model": "insightface",
671
+ "detect_gender_input": "no",
672
+ "detect_gender_source": "no",
673
+ "input_faces_index": "0",
674
+ "source_faces_index": "0",
675
+ "faces_index": "0",
676
+ "threshold": 0.5,
677
+ "max_faces": 10
678
+ }
679
+ }
680
+ ],
681
+ "links": [
682
+ [
683
+ 1,
684
+ 1,
685
+ 0,
686
+ 3,
687
+ 0,
688
+ "IMAGE"
689
+ ],
690
+ [
691
+ 2,
692
+ 2,
693
+ 0,
694
+ 3,
695
+ 1,
696
+ "IMAGE"
697
+ ],
698
+ [
699
+ 3,
700
+ 3,
701
+ 0,
702
+ 5,
703
+ 0,
704
+ "IMAGE"
705
+ ],
706
+ [
707
+ 4,
708
+ 4,
709
+ 0,
710
+ 3,
711
+ 2,
712
+ "FACE_MODEL"
713
+ ],
714
+ [
715
+ 5,
716
+ 5,
717
+ 0,
718
+ 6,
719
+ 0,
720
+ "IMAGE"
721
+ ],
722
+ [
723
+ 6,
724
+ 9,
725
+ 0,
726
+ 3,
727
+ 2,
728
+ "FACE_MODEL"
729
+ ],
730
+ [
731
+ 7,
732
+ 12,
733
+ 0,
734
+ 2,
735
+ 3,
736
+ "INT"
737
+ ],
738
+ [
739
+ 8,
740
+ 13,
741
+ 0,
742
+ 3,
743
+ 0,
744
+ "IMAGE"
745
+ ],
746
+ [
747
+ 9,
748
+ 15,
749
+ 0,
750
+ 3,
751
+ 3,
752
+ "OPTIONS"
753
+ ]
754
+ ],
755
+ "groups": [
756
+ {
757
+ "title": "Input Section",
758
+ "pos": [
759
+ 50,
760
+ 50,
761
+ 400,
762
+ 700
763
+ ],
764
+ "color": "#3f3",
765
+ "nodes": [
766
+ 1,
767
+ 2,
768
+ 12,
769
+ 13
770
  ]
771
  },
772
  {
773
+ "title": "Face Swap Processing",
 
774
  "pos": [
775
+ 420,
776
+ 50,
777
+ 400,
778
+ 900
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
779
  ],
780
+ "color": "#33f",
781
+ "nodes": [
782
+ 3,
783
+ 4,
784
+ 9,
785
+ 15
786
  ]
787
  },
788
  {
789
+ "title": "Output Section",
 
790
  "pos": [
791
+ 780,
792
+ 50,
793
+ 400,
794
  500
795
  ],
796
+ "color": "#f33",
797
+ "nodes": [
798
+ 5,
799
+ 6,
800
+ 7,
801
+ 10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
802
  ]
803
+ }
804
+ ],
805
+ "config": {},
806
+ "extra": {
807
+ "ds": {
808
+ "scale": 1,
809
+ "offset": [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  0,
811
+ 0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
812
  ]
813
+ }
814
+ },
815
+ "version": 0.4,
816
+ "built_with": "anycoder - https://huggingface.co/spaces/akhaliq/anycoder"
817
+ }</pre>
818
+ </div>
819
+ </div>
820
+
821
+ <script>
822
+ function copyToClipboard() {
823
+ const jsonContent = document.getElementById('json-content').textContent;
824
+ navigator.clipboard.writeText(jsonContent).then(() => {
825
+ const btn = event.target;
826
+ const originalText = btn.textContent;
827
+ btn.textContent = 'Copied!';
828
+ btn.classList.add('success');
829
+ setTimeout(() => {
830
+ btn.textContent = originalText;
831
+ btn.classList.remove('success');
832
+ }, 2000);
833
+ }).catch(err => {
834
+ alert('Failed to copy to clipboard');
835
+ });
836
+ }
837
+
838
+ function downloadJSON() {
839
+ const jsonContent = document.getElementById('json-content').textContent;
840
+ const blob = new Blob([jsonContent], { type: 'application/json' });
841
+ const url = URL.createObjectURL(blob);
842
+ const a = document.createElement('a');
843
+ a.href = url;
844
+ a.download = 'comfyui_workflow.json';
845
+ document.body.appendChild(a);
846
+ a.click();
847
+ document.body.removeChild(a);
848
+ URL.revokeObjectURL(url);
849
+
850
+ const btn = event.target;
851
+ const originalText = btn.textContent;
852
+ btn.textContent = 'Downloaded!';
853
+ btn.classList.add('success');
854
+ setTimeout(() => {
855
+ btn.textContent = originalText;
856
+ btn.classList.remove('success');
857
+ }, 2000);
858
+ }
859
+
860
+ // Add syntax highlighting
861
+ function highlightJSON() {
862
+ const content = document.getElementById('json-content');
863
+ let html = content.innerHTML;
864
+
865
+ // Highlight different JSON elements
866
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
867
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
868
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
869
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
870
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
871
+
872
+ content.innerHTML = html;
873
+ }
874
+
875
+ // Apply syntax highlighting after page load
876
+ window.addEventListener('load', highlightJSON);
877
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
878
  </body>
879
  </html>