@genfeedai/workflows 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  buildFlux2DevPrompt: () => buildFlux2DevPrompt,
37
37
  buildFlux2DevPulidLoraPrompt: () => buildFlux2DevPulidLoraPrompt,
38
38
  buildFlux2DevPulidPrompt: () => buildFlux2DevPulidPrompt,
39
+ buildFlux2DevPulidUpscalePrompt: () => buildFlux2DevPulidUpscalePrompt,
39
40
  buildFlux2KleinPrompt: () => buildFlux2KleinPrompt,
40
41
  buildFluxDevPrompt: () => buildFluxDevPrompt,
41
42
  buildPulidFluxPrompt: () => buildPulidFluxPrompt,
@@ -262,14 +263,12 @@ function buildPulidFluxPrompt(params) {
262
263
  "2": {
263
264
  class_type: "PulidModelLoader",
264
265
  inputs: {
265
- pulid_file: "ip-adapter_pulid_sdxl_fp16.safetensors"
266
+ pulid_file: "ip-adapter_pulid_flux_v0.9.1.safetensors"
266
267
  }
267
268
  },
268
269
  "3": {
269
- class_type: "LoadImage",
270
- inputs: {
271
- image: faceImage
272
- }
270
+ class_type: "PulidEvaClipLoader",
271
+ inputs: {}
273
272
  },
274
273
  "4": {
275
274
  class_type: "PulidInsightFaceLoader",
@@ -278,30 +277,40 @@ function buildPulidFluxPrompt(params) {
278
277
  }
279
278
  },
280
279
  "5": {
280
+ class_type: "LoadImage",
281
+ inputs: {
282
+ image: faceImage
283
+ }
284
+ },
285
+ "6": {
281
286
  class_type: "ApplyPulid",
282
287
  inputs: {
283
288
  model: ["1", 0],
284
289
  pulid: ["2", 0],
285
- image: ["3", 0],
286
- insightface: ["4", 0],
287
- weight: pulidStrength
290
+ eva_clip: ["3", 0],
291
+ face_analysis: ["4", 0],
292
+ image: ["5", 0],
293
+ method: "fidelity",
294
+ weight: pulidStrength,
295
+ start_at: 0,
296
+ end_at: 1
288
297
  }
289
298
  },
290
- "6": {
299
+ "7": {
291
300
  class_type: "CLIPTextEncode",
292
301
  inputs: {
293
302
  text: prompt,
294
303
  clip: ["1", 1]
295
304
  }
296
305
  },
297
- "7": {
306
+ "8": {
298
307
  class_type: "CLIPTextEncode",
299
308
  inputs: {
300
309
  text: "",
301
310
  clip: ["1", 1]
302
311
  }
303
312
  },
304
- "8": {
313
+ "9": {
305
314
  class_type: "EmptyLatentImage",
306
315
  inputs: {
307
316
  width,
@@ -309,13 +318,13 @@ function buildPulidFluxPrompt(params) {
309
318
  batch_size: 1
310
319
  }
311
320
  },
312
- "9": {
321
+ "10": {
313
322
  class_type: "KSampler",
314
323
  inputs: {
315
- model: ["5", 0],
316
- positive: ["6", 0],
317
- negative: ["7", 0],
318
- latent_image: ["8", 0],
324
+ model: ["6", 0],
325
+ positive: ["7", 0],
326
+ negative: ["8", 0],
327
+ latent_image: ["9", 0],
319
328
  seed,
320
329
  steps,
321
330
  cfg,
@@ -324,17 +333,17 @@ function buildPulidFluxPrompt(params) {
324
333
  denoise: 1
325
334
  }
326
335
  },
327
- "10": {
336
+ "11": {
328
337
  class_type: "VAEDecode",
329
338
  inputs: {
330
- samples: ["9", 0],
339
+ samples: ["10", 0],
331
340
  vae: ["1", 2]
332
341
  }
333
342
  },
334
- "11": {
343
+ "12": {
335
344
  class_type: "SaveImage",
336
345
  inputs: {
337
- images: ["10", 0],
346
+ images: ["11", 0],
338
347
  filename_prefix: "genfeed-pulid-flux"
339
348
  }
340
349
  }
@@ -428,24 +437,38 @@ function buildFlux2DevPrompt(params) {
428
437
  "2": {
429
438
  class_type: "CLIPLoader",
430
439
  inputs: {
431
- clip_name: "mistral_3_small_flux2_fp4_mixed.safetensors",
432
- type: "flux"
440
+ clip_name: "mistral_3_small_flux2_fp8.safetensors",
441
+ type: "flux2"
433
442
  }
434
443
  },
435
444
  "3": {
436
- class_type: "Flux2TextEncode",
445
+ class_type: "CLIPTextEncode",
437
446
  inputs: {
438
447
  text: prompt,
439
448
  clip: ["2", 0]
440
449
  }
441
450
  },
442
451
  "4": {
452
+ class_type: "FluxGuidance",
453
+ inputs: {
454
+ conditioning: ["3", 0],
455
+ guidance
456
+ }
457
+ },
458
+ "5": {
459
+ class_type: "CLIPTextEncode",
460
+ inputs: {
461
+ text: "",
462
+ clip: ["2", 0]
463
+ }
464
+ },
465
+ "6": {
443
466
  class_type: "VAELoader",
444
467
  inputs: {
445
468
  vae_name: "flux2-vae.safetensors"
446
469
  }
447
470
  },
448
- "5": {
471
+ "7": {
449
472
  class_type: "EmptyLatentImage",
450
473
  inputs: {
451
474
  width,
@@ -453,32 +476,32 @@ function buildFlux2DevPrompt(params) {
453
476
  batch_size: 1
454
477
  }
455
478
  },
456
- "6": {
479
+ "8": {
457
480
  class_type: "KSampler",
458
481
  inputs: {
459
482
  model: ["1", 0],
460
- positive: ["3", 0],
461
- negative: ["3", 1],
462
- latent_image: ["5", 0],
483
+ positive: ["4", 0],
484
+ negative: ["5", 0],
485
+ latent_image: ["7", 0],
463
486
  seed,
464
487
  steps,
465
- cfg: guidance,
488
+ cfg: 1,
466
489
  sampler_name: "euler",
467
490
  scheduler: "normal",
468
491
  denoise: 1
469
492
  }
470
493
  },
471
- "7": {
494
+ "9": {
472
495
  class_type: "VAEDecode",
473
496
  inputs: {
474
- samples: ["6", 0],
475
- vae: ["4", 0]
497
+ samples: ["8", 0],
498
+ vae: ["6", 0]
476
499
  }
477
500
  },
478
- "8": {
501
+ "10": {
479
502
  class_type: "SaveImage",
480
503
  inputs: {
481
- images: ["7", 0],
504
+ images: ["9", 0],
482
505
  filename_prefix: "genfeed-flux2-dev"
483
506
  }
484
507
  }
@@ -493,7 +516,10 @@ function buildFlux2DevPulidPrompt(params) {
493
516
  height = 1024,
494
517
  steps = 20,
495
518
  guidance = 3.5,
496
- pulidStrength = 0.8
519
+ pulidStrength = 0.8,
520
+ pulidMethod = "fidelity",
521
+ pulidStartAt = 0,
522
+ pulidEndAt = 1
497
523
  } = params;
498
524
  return {
499
525
  "1": {
@@ -506,22 +532,152 @@ function buildFlux2DevPulidPrompt(params) {
506
532
  "2": {
507
533
  class_type: "CLIPLoader",
508
534
  inputs: {
509
- clip_name: "mistral_3_small_flux2_fp4_mixed.safetensors",
510
- type: "flux"
535
+ clip_name: "mistral_3_small_flux2_fp8.safetensors",
536
+ type: "flux2"
511
537
  }
512
538
  },
513
539
  "3": {
514
540
  class_type: "PulidModelLoader",
515
541
  inputs: {
516
- pulid_file: "ip-adapter_pulid_sdxl_fp16.safetensors"
542
+ pulid_file: "ip-adapter_pulid_flux_v0.9.1.safetensors"
517
543
  }
518
544
  },
519
545
  "4": {
546
+ class_type: "PulidEvaClipLoader",
547
+ inputs: {}
548
+ },
549
+ "5": {
550
+ class_type: "PulidInsightFaceLoader",
551
+ inputs: {
552
+ provider: "CPU"
553
+ }
554
+ },
555
+ "6": {
520
556
  class_type: "LoadImage",
521
557
  inputs: {
522
558
  image: faceImage
523
559
  }
524
560
  },
561
+ "7": {
562
+ class_type: "ApplyPulid",
563
+ inputs: {
564
+ model: ["1", 0],
565
+ pulid: ["3", 0],
566
+ eva_clip: ["4", 0],
567
+ face_analysis: ["5", 0],
568
+ image: ["6", 0],
569
+ method: pulidMethod,
570
+ weight: pulidStrength,
571
+ start_at: pulidStartAt,
572
+ end_at: pulidEndAt
573
+ }
574
+ },
575
+ "8": {
576
+ class_type: "CLIPTextEncode",
577
+ inputs: {
578
+ text: prompt,
579
+ clip: ["2", 0]
580
+ }
581
+ },
582
+ "9": {
583
+ class_type: "FluxGuidance",
584
+ inputs: {
585
+ conditioning: ["8", 0],
586
+ guidance
587
+ }
588
+ },
589
+ "10": {
590
+ class_type: "CLIPTextEncode",
591
+ inputs: {
592
+ text: "",
593
+ clip: ["2", 0]
594
+ }
595
+ },
596
+ "11": {
597
+ class_type: "VAELoader",
598
+ inputs: {
599
+ vae_name: "flux2-vae.safetensors"
600
+ }
601
+ },
602
+ "12": {
603
+ class_type: "EmptyLatentImage",
604
+ inputs: {
605
+ width,
606
+ height,
607
+ batch_size: 1
608
+ }
609
+ },
610
+ "13": {
611
+ class_type: "KSampler",
612
+ inputs: {
613
+ model: ["7", 0],
614
+ positive: ["9", 0],
615
+ negative: ["10", 0],
616
+ latent_image: ["12", 0],
617
+ seed,
618
+ steps,
619
+ cfg: 1,
620
+ sampler_name: "euler",
621
+ scheduler: "normal",
622
+ denoise: 1
623
+ }
624
+ },
625
+ "14": {
626
+ class_type: "VAEDecode",
627
+ inputs: {
628
+ samples: ["13", 0],
629
+ vae: ["11", 0]
630
+ }
631
+ },
632
+ "15": {
633
+ class_type: "SaveImage",
634
+ inputs: {
635
+ images: ["14", 0],
636
+ filename_prefix: "genfeed-flux2-pulid"
637
+ }
638
+ }
639
+ };
640
+ }
641
+ function buildFlux2DevPulidUpscalePrompt(params) {
642
+ const {
643
+ prompt,
644
+ faceImage,
645
+ seed = Math.floor(Math.random() * 2 ** 32),
646
+ width = 832,
647
+ height = 1216,
648
+ steps = 20,
649
+ guidance = 3.5,
650
+ pulidStrength = 0.8,
651
+ pulidMethod = "fidelity",
652
+ pulidStartAt = 0,
653
+ pulidEndAt = 1,
654
+ upscaleModel = "4x-UltraSharp.pth"
655
+ } = params;
656
+ return {
657
+ "1": {
658
+ class_type: "UNETLoader",
659
+ inputs: {
660
+ unet_name: "flux2_dev_fp8mixed.safetensors",
661
+ weight_dtype: "fp8_e4m3fn"
662
+ }
663
+ },
664
+ "2": {
665
+ class_type: "CLIPLoader",
666
+ inputs: {
667
+ clip_name: "mistral_3_small_flux2_fp8.safetensors",
668
+ type: "flux2"
669
+ }
670
+ },
671
+ "3": {
672
+ class_type: "PulidModelLoader",
673
+ inputs: {
674
+ pulid_file: "ip-adapter_pulid_flux_v0.9.1.safetensors"
675
+ }
676
+ },
677
+ "4": {
678
+ class_type: "PulidEvaClipLoader",
679
+ inputs: {}
680
+ },
525
681
  "5": {
526
682
  class_type: "PulidInsightFaceLoader",
527
683
  inputs: {
@@ -529,29 +685,53 @@ function buildFlux2DevPulidPrompt(params) {
529
685
  }
530
686
  },
531
687
  "6": {
688
+ class_type: "LoadImage",
689
+ inputs: {
690
+ image: faceImage
691
+ }
692
+ },
693
+ "7": {
532
694
  class_type: "ApplyPulid",
533
695
  inputs: {
534
696
  model: ["1", 0],
535
697
  pulid: ["3", 0],
536
- image: ["4", 0],
537
- insightface: ["5", 0],
538
- weight: pulidStrength
698
+ eva_clip: ["4", 0],
699
+ face_analysis: ["5", 0],
700
+ image: ["6", 0],
701
+ method: pulidMethod,
702
+ weight: pulidStrength,
703
+ start_at: pulidStartAt,
704
+ end_at: pulidEndAt
539
705
  }
540
706
  },
541
- "7": {
542
- class_type: "Flux2TextEncode",
707
+ "8": {
708
+ class_type: "CLIPTextEncode",
543
709
  inputs: {
544
710
  text: prompt,
545
711
  clip: ["2", 0]
546
712
  }
547
713
  },
548
- "8": {
714
+ "9": {
715
+ class_type: "FluxGuidance",
716
+ inputs: {
717
+ conditioning: ["8", 0],
718
+ guidance
719
+ }
720
+ },
721
+ "10": {
722
+ class_type: "CLIPTextEncode",
723
+ inputs: {
724
+ text: "",
725
+ clip: ["2", 0]
726
+ }
727
+ },
728
+ "11": {
549
729
  class_type: "VAELoader",
550
730
  inputs: {
551
731
  vae_name: "flux2-vae.safetensors"
552
732
  }
553
733
  },
554
- "9": {
734
+ "12": {
555
735
  class_type: "EmptyLatentImage",
556
736
  inputs: {
557
737
  width,
@@ -559,33 +739,46 @@ function buildFlux2DevPulidPrompt(params) {
559
739
  batch_size: 1
560
740
  }
561
741
  },
562
- "10": {
742
+ "13": {
563
743
  class_type: "KSampler",
564
744
  inputs: {
565
- model: ["6", 0],
566
- positive: ["7", 0],
567
- negative: ["7", 1],
568
- latent_image: ["9", 0],
745
+ model: ["7", 0],
746
+ positive: ["9", 0],
747
+ negative: ["10", 0],
748
+ latent_image: ["12", 0],
569
749
  seed,
570
750
  steps,
571
- cfg: guidance,
751
+ cfg: 1,
572
752
  sampler_name: "euler",
573
753
  scheduler: "normal",
574
754
  denoise: 1
575
755
  }
576
756
  },
577
- "11": {
757
+ "14": {
578
758
  class_type: "VAEDecode",
579
759
  inputs: {
580
- samples: ["10", 0],
581
- vae: ["8", 0]
760
+ samples: ["13", 0],
761
+ vae: ["11", 0]
582
762
  }
583
763
  },
584
- "12": {
764
+ "15": {
765
+ class_type: "UpscaleModelLoader",
766
+ inputs: {
767
+ model_name: upscaleModel
768
+ }
769
+ },
770
+ "16": {
771
+ class_type: "ImageUpscaleWithModel",
772
+ inputs: {
773
+ upscale_model: ["15", 0],
774
+ image: ["14", 0]
775
+ }
776
+ },
777
+ "17": {
585
778
  class_type: "SaveImage",
586
779
  inputs: {
587
- images: ["11", 0],
588
- filename_prefix: "genfeed-flux2-pulid"
780
+ images: ["16", 0],
781
+ filename_prefix: "genfeed-flux2-pulid-4k"
589
782
  }
590
783
  }
591
784
  };
@@ -601,6 +794,9 @@ function buildFlux2DevPulidLoraPrompt(params) {
601
794
  steps = 20,
602
795
  guidance = 3.5,
603
796
  pulidStrength = 0.8,
797
+ pulidMethod = "fidelity",
798
+ pulidStartAt = 0,
799
+ pulidEndAt = 1,
604
800
  loraStrength = 0.8
605
801
  } = params;
606
802
  return {
@@ -614,8 +810,8 @@ function buildFlux2DevPulidLoraPrompt(params) {
614
810
  "2": {
615
811
  class_type: "CLIPLoader",
616
812
  inputs: {
617
- clip_name: "mistral_3_small_flux2_fp4_mixed.safetensors",
618
- type: "flux"
813
+ clip_name: "mistral_3_small_flux2_fp8.safetensors",
814
+ type: "flux2"
619
815
  }
620
816
  },
621
817
  "3": {
@@ -631,14 +827,12 @@ function buildFlux2DevPulidLoraPrompt(params) {
631
827
  "4": {
632
828
  class_type: "PulidModelLoader",
633
829
  inputs: {
634
- pulid_file: "ip-adapter_pulid_sdxl_fp16.safetensors"
830
+ pulid_file: "ip-adapter_pulid_flux_v0.9.1.safetensors"
635
831
  }
636
832
  },
637
833
  "5": {
638
- class_type: "LoadImage",
639
- inputs: {
640
- image: faceImage
641
- }
834
+ class_type: "PulidEvaClipLoader",
835
+ inputs: {}
642
836
  },
643
837
  "6": {
644
838
  class_type: "PulidInsightFaceLoader",
@@ -647,29 +841,53 @@ function buildFlux2DevPulidLoraPrompt(params) {
647
841
  }
648
842
  },
649
843
  "7": {
844
+ class_type: "LoadImage",
845
+ inputs: {
846
+ image: faceImage
847
+ }
848
+ },
849
+ "8": {
650
850
  class_type: "ApplyPulid",
651
851
  inputs: {
652
852
  model: ["3", 0],
653
853
  pulid: ["4", 0],
654
- image: ["5", 0],
655
- insightface: ["6", 0],
656
- weight: pulidStrength
854
+ eva_clip: ["5", 0],
855
+ face_analysis: ["6", 0],
856
+ image: ["7", 0],
857
+ method: pulidMethod,
858
+ weight: pulidStrength,
859
+ start_at: pulidStartAt,
860
+ end_at: pulidEndAt
657
861
  }
658
862
  },
659
- "8": {
660
- class_type: "Flux2TextEncode",
863
+ "9": {
864
+ class_type: "CLIPTextEncode",
661
865
  inputs: {
662
866
  text: prompt,
663
867
  clip: ["3", 1]
664
868
  }
665
869
  },
666
- "9": {
870
+ "10": {
871
+ class_type: "FluxGuidance",
872
+ inputs: {
873
+ conditioning: ["9", 0],
874
+ guidance
875
+ }
876
+ },
877
+ "11": {
878
+ class_type: "CLIPTextEncode",
879
+ inputs: {
880
+ text: "",
881
+ clip: ["3", 1]
882
+ }
883
+ },
884
+ "12": {
667
885
  class_type: "VAELoader",
668
886
  inputs: {
669
887
  vae_name: "flux2-vae.safetensors"
670
888
  }
671
889
  },
672
- "10": {
890
+ "13": {
673
891
  class_type: "EmptyLatentImage",
674
892
  inputs: {
675
893
  width,
@@ -677,32 +895,32 @@ function buildFlux2DevPulidLoraPrompt(params) {
677
895
  batch_size: 1
678
896
  }
679
897
  },
680
- "11": {
898
+ "14": {
681
899
  class_type: "KSampler",
682
900
  inputs: {
683
- model: ["7", 0],
684
- positive: ["8", 0],
685
- negative: ["8", 1],
686
- latent_image: ["10", 0],
901
+ model: ["8", 0],
902
+ positive: ["10", 0],
903
+ negative: ["11", 0],
904
+ latent_image: ["13", 0],
687
905
  seed,
688
906
  steps,
689
- cfg: guidance,
907
+ cfg: 1,
690
908
  sampler_name: "euler",
691
909
  scheduler: "normal",
692
910
  denoise: 1
693
911
  }
694
912
  },
695
- "12": {
913
+ "15": {
696
914
  class_type: "VAEDecode",
697
915
  inputs: {
698
- samples: ["11", 0],
699
- vae: ["9", 0]
916
+ samples: ["14", 0],
917
+ vae: ["12", 0]
700
918
  }
701
919
  },
702
- "13": {
920
+ "16": {
703
921
  class_type: "SaveImage",
704
922
  inputs: {
705
- images: ["12", 0],
923
+ images: ["15", 0],
706
924
  filename_prefix: "genfeed-flux2-pulid-lora"
707
925
  }
708
926
  }
@@ -727,24 +945,38 @@ function buildFlux2KleinPrompt(params) {
727
945
  "2": {
728
946
  class_type: "CLIPLoader",
729
947
  inputs: {
730
- clip_name: "mistral_3_small_flux2_fp4_mixed.safetensors",
731
- type: "flux"
948
+ clip_name: "mistral_3_small_flux2_fp8.safetensors",
949
+ type: "flux2"
732
950
  }
733
951
  },
734
952
  "3": {
735
- class_type: "Flux2TextEncode",
953
+ class_type: "CLIPTextEncode",
736
954
  inputs: {
737
955
  text: prompt,
738
956
  clip: ["2", 0]
739
957
  }
740
958
  },
741
959
  "4": {
960
+ class_type: "FluxGuidance",
961
+ inputs: {
962
+ conditioning: ["3", 0],
963
+ guidance: 3.5
964
+ }
965
+ },
966
+ "5": {
967
+ class_type: "CLIPTextEncode",
968
+ inputs: {
969
+ text: "",
970
+ clip: ["2", 0]
971
+ }
972
+ },
973
+ "6": {
742
974
  class_type: "VAELoader",
743
975
  inputs: {
744
976
  vae_name: "flux2-vae.safetensors"
745
977
  }
746
978
  },
747
- "5": {
979
+ "7": {
748
980
  class_type: "EmptyLatentImage",
749
981
  inputs: {
750
982
  width,
@@ -752,32 +984,32 @@ function buildFlux2KleinPrompt(params) {
752
984
  batch_size: 1
753
985
  }
754
986
  },
755
- "6": {
987
+ "8": {
756
988
  class_type: "KSampler",
757
989
  inputs: {
758
990
  model: ["1", 0],
759
- positive: ["3", 0],
760
- negative: ["3", 1],
761
- latent_image: ["5", 0],
991
+ positive: ["4", 0],
992
+ negative: ["5", 0],
993
+ latent_image: ["7", 0],
762
994
  seed,
763
995
  steps,
764
- cfg: 3.5,
996
+ cfg: 1,
765
997
  sampler_name: "euler",
766
998
  scheduler: "normal",
767
999
  denoise: 1
768
1000
  }
769
1001
  },
770
- "7": {
1002
+ "9": {
771
1003
  class_type: "VAEDecode",
772
1004
  inputs: {
773
- samples: ["6", 0],
774
- vae: ["4", 0]
1005
+ samples: ["8", 0],
1006
+ vae: ["6", 0]
775
1007
  }
776
1008
  },
777
- "8": {
1009
+ "10": {
778
1010
  class_type: "SaveImage",
779
1011
  inputs: {
780
- images: ["7", 0],
1012
+ images: ["9", 0],
781
1013
  filename_prefix: "genfeed-flux2-klein"
782
1014
  }
783
1015
  }
@@ -904,6 +1136,7 @@ function searchWorkflowsByTag(tag) {
904
1136
  buildFlux2DevPrompt,
905
1137
  buildFlux2DevPulidLoraPrompt,
906
1138
  buildFlux2DevPulidPrompt,
1139
+ buildFlux2DevPulidUpscalePrompt,
907
1140
  buildFlux2KleinPrompt,
908
1141
  buildFluxDevPrompt,
909
1142
  buildPulidFluxPrompt,