-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmongo-init.js
1042 lines (980 loc) · 25.8 KB
/
mongo-init.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
db = db.getSiblingDB('eden');
db.createUser({
user: 'eden',
pwd: 'eden',
roles: [
{
role: 'readWrite',
db: 'eden',
},
],
});
db.createCollection('users');
const admin = db.users.insertMany([
{
userId: 'admin',
username: 'admin',
isWallet: false,
isAdmin: true,
createdAt: new Date(),
updatedAt: new Date(),
},
]);
db.createCollection('apikeys');
db.apikeys.insertMany([
{
user: admin.insertedIds[0],
apiKey: 'admin',
apiSecret: 'admin',
note: 'Admin API key',
deleted: false,
createdAt: new Date(),
updatedAt: new Date(),
},
]);
db.createCollection('generators');
const baseParameters = [
{
name: 'width',
label: 'Width',
description: 'Width of the creation in pixels',
default: 768,
minimum: 256,
maximum: 1280,
step: 64,
},
{
name: 'height',
label: 'Height',
description: 'Height of the creation in pixels',
default: 768,
minimum: 256,
maximum: 1280,
step: 64,
},
{
name: 'upscale_f',
label: 'Upscale Factor',
description: 'Diffusion-based upscaling factor',
default: 1.5,
minimum: 1.0,
maximum: 2.0,
step: 0.1,
optional: true,
},
{
name: 'checkpoint',
label: 'Checkpoint',
description: 'Which model checkpoint to generate with',
default: 'eden:eden-v1',
allowedValues: [
'eden:eden-v1',
'gordon-berger:gordon-berger-figurative',
],
},
{
name: 'lora',
label: 'LORA',
description: '(optional) Use LORA on top of the model. To prompt, use <lora_name> e.g. "A photo of <Bill>". Make sure you load LORA on top of the base model is was trained on!',
default: '(none)',
// allowedValues: ['(none)'],
},
{
name: 'lora_scale',
label: 'LORA scale',
description: 'How strongly to apply the LoRa weights (0.0 will result in the base model)',
default: 0.8,
minimum: 0.0,
maximum: 1.2,
step: 0.1,
},
{
name: 'sampler',
label: 'Sampler',
description: 'Sampler to use for generation',
default: 'euler',
allowedValues: ['euler'],
//allowedValues: ['klms', 'dpm2', 'dpm2_ancestral', 'heun', 'euler', 'euler_ancestral', 'ddim', 'plms', 'dpm'],
optional: true,
},
{
name: 'steps',
label: 'Steps',
description: 'Number of sampling steps',
default: 40,
minimum: 10,
maximum: 100,
optional: true,
},
{
name: 'guidance_scale',
label: 'Guidance scale',
description: 'Strength of prompt conditioning guidance',
default: 7.5,
minimum: 0.0,
maximum: 30.0,
step: 0.1,
optional: true,
},
{
name: 'stream',
label: 'Stream',
description: 'Yield intermediate results during creation process (if false, only final result is returned)',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'stream_every',
label: 'Stream every',
description: 'How often to yield intermediate results (when stream is true). In sampling steps for images, frames for video.',
default: 1,
minimum: 1,
maximum: 10,
optional: true,
}
]
const animationParameters = [
{
name: 'n_frames',
label: 'Frames',
description: 'Number of frames in the video',
default: 60,
minimum: 3,
maximum: 300,
},
{
name: 'loop',
label: 'Loop',
description: 'Loop the output video',
default: false,
allowedValues: [false, true],
},
{
name: 'smooth',
label: 'Smooth',
description: 'Optimize video for perceptual smoothness between frames (if false, frames are linearly spaced in prompt conditioning space)',
default: true,
//allowedValues: [false, true],
allowedValues: [true],
optional: true,
},
{
name: 'n_film',
label: 'FILM Iterations',
description: 'Optionally apply FILM postprocessing to the generated frames to create a smoother video',
default: 1,
allowedValues: [0, 1],
optional: true,
},
{
name: 'fps',
label: 'FPS',
description: 'Frames per second of the output video',
default: 12,
minimum: 1,
maximum: 30,
optional: true,
},
{
name: 'scale_modulation',
label: 'Scale Modulation',
description: 'How much to scale down the guidance scale of the prompt conditioning in between keyframes',
default: 0.0,
minimum: 0.0,
maximum: 0.25,
step: 0.01,
optional: true,
},
]
const createParameters = [
...baseParameters,
{
name: 'text_input',
label: 'Prompt',
description: 'Text prompt for the creation',
default: null,
isRequired: true,
},
{
name: 'uc_text',
label: 'Negative prompt',
description: 'Unconditional (negative) prompt: what you DONT want to see',
default: 'watermark, text, nude, naked, nsfw, poorly drawn face, ugly, tiling, out of frame, blurry, blurred, grainy, signature, cut off, draft',
optional: true,
},
{
name: 'init_image_data',
label: 'Init image',
default: null,
description: 'URL of image to initiate image before diffusion (if null, use random noise)',
mediaUpload: true,
optional: true,
},
{
name: 'init_image_strength',
label: 'Init image strength',
description: 'How much to weight the initial image in the diffusion process (closer to 1.0 = more influence)',
default: 0.0,
minimum: 0.0,
maximum: 1.0,
step: 0.01,
optional: true,
},
{
name: 'n_samples',
label: 'Samples',
description: 'Number of samples to create.',
default: 1,
allowedValues: [1, 2, 4],
optional: true,
},
{
name: 'seed',
label: 'Seed',
description: 'Set random seed for reproducibility. If blank, will be set randomly.',
default: null,
minimum: 0,
maximum: 1e8,
optional: true,
}
]
const interpolationParameters = [
...baseParameters,
...animationParameters,
{
name: 'interpolation_texts',
label: 'Prompts',
description: 'Prompts to interpolate through',
default: [],
minLength: 2,
maxLength: 5,
isRequired: true,
},
{
name: 'interpolation_seeds',
label: 'Seeds',
description: 'Random seeds. Must have 1 for each prompt. If left blank, will be set randomly.',
default: [],
optional: true,
}
]
const real2realParameters = [
...baseParameters,
...animationParameters,
{
name: 'interpolation_init_images',
label: 'Real images',
description: 'URLs of images to use as init images for real2real',
default: [],
mediaUpload: true,
minLength: 2,
maxLength: 5,
isRequired: true,
},
{
name: 'interpolation_init_images_power',
label: 'Init image power',
description: 'Power of the init_img_strength curve (how fast init_img_strength declines at the keyframes)',
default: 3.0,
minimum: 0.5,
maximum: 5.0,
step: 0.01,
optional: true,
},
{
name: 'interpolation_init_images_min_strength',
label: 'Init image min strength',
description: 'Min strength of the init_img during interpolation. Lower values will give the interpolation more freedom, leading to more visual changes at the cost of less smoothness',
default: 0.25,
minimum: 0.0,
maximum: 0.75,
step: 0.01,
optional: true,
},
{
name: 'interpolation_init_images_max_strength',
label: 'Init image max strength',
description: 'Max strength of the init_img during interpolation. Setting this to 1.0 will exactly reproduce the init imgs at some point in the video, but also causes a slight flicker',
default: 0.95,
minimum: 0.5,
maximum: 1.0,
step: 0.01,
optional: true,
},
{
name: 'interpolation_seeds',
label: 'Interpolation seeds',
description: 'Random seeds. Must have 1 for each init image. If left blank, will be set randomly.',
default: [],
optional: true,
}
]
const remixParameters = [
...baseParameters,
{
name: 'init_image_data',
label: 'Init image',
description: 'URL of image to initiate image before diffusion (if null, use random noise)',
default: null,
mediaUpload: true,
isRequired: true,
},
{
name: 'init_image_strength',
label: 'Init image strength',
description: 'How much to weight the input init image in the diffusion process. Setting this to 0.0 will only use the guessed prompt and no img_guidance',
default: 0.2,
minimum: 0.0,
maximum: 0.8,
step: 0.01,
},
{
name: 'n_samples',
label: 'Samples',
description: 'Number of samples to create remix',
default: 1,
allowedValues: [1, 2, 4],
optional: true,
},
{
name: 'uc_text',
label: 'Negative prompt',
description: 'Unconditional (negative) prompt',
default: 'nude, naked, nsfw, poorly drawn face, ugly, tiling, out of frame, extra limbs, disfigured, deformed body, blurry, blurred, watermark, text, grainy, signature, cut off, draft',
optional: true,
},
{
name: 'seed',
label: 'Seed',
description: 'Set random seed for reproducibility. If blank, will be set randomly.',
default: null,
minimum: 0,
maximum: 1e8,
optional: true,
}
]
const interrogateParameters = [
{
name: 'init_image_data',
label: 'Image',
description: 'URL of image to initiate image before diffusion (if null, use random noise)',
default: null,
mediaUpload: true,
isRequired: true,
},
]
const loraParameters = [
{
name: 'lora_training_urls',
label: 'Training images',
description: 'URLs for the image files of target concept to train a LORA for',
mediaUpload: true,
default: [],
minLength: 1,
maxLength: 8,
isRequired: true,
},
{
name: 'checkpoint',
label: 'Base checkpoint',
description: 'Base checkpoint to train from',
default: 'eden:eden-v1',
allowedValues: [
'eden:eden-v1',
'gordon-berger:gordon-berger-figurative',
],
},
{
name: 'name',
label: 'LORA name',
description: 'Choose a name to save the LORA. This also sets how you will trigger the concept when prompting: <lora_name>',
default: null,
isRequired: true,
},
{
name: 'use_template',
label: 'Template',
description: 'Which template to train from. Person works well, style and object are still experimental.',
default: 'person',
allowedValues: ['person', 'object', 'style'],
isRequired: true,
},
{
name: 'train_text_encoder',
label: 'Train text encoder',
description: 'Train a LoRa on top of the text encoder',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'perform_inversion',
label: 'Perform inversion',
description: 'Perform textual inversion (find a token to represent your concept)',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'resolution',
label: 'Resolution',
description: 'Image resolution (higher res needs lower batch size to avoid OOM!)',
default: 512,
minimum: 512,
maximum: 640,
optional: true,
},
{
name: 'train_batch_size',
label: 'Batch size',
description: 'Training batch size',
default: 5,
minimum: 1,
maximum: 5,
optional: true,
},
{
name: 'gradient_accumulation_steps',
label: 'Gradient accumulation steps',
description: 'Gradient accumulation steps',
default: 1,
minimum: 1,
maximum: 4,
optional: true,
},
{
name: 'scale_lr',
label: 'Scale learning rate',
description: 'Scale learning rate',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'learning_rate_ti',
label: 'Textual inversion learning rate',
description: 'Learning rate for textual inversion',
default: 3e-4,
minimum: 1e-5,
maximum: 1e-3,
step: 1e-5,
optional: true,
},
{
name: 'continue_inversion',
label: 'Continue inversion',
description: 'Continue textual inversion phase while training the LoRa model',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'continue_inversion_lr',
label: 'Continue inversion learning rate',
description: 'Continue inversion learning rate (should be relatively low)',
default: 1e-5,
minimum: 1e-6,
maximum: 1e-4,
step: 1e-6,
optional: true,
},
{
name: 'learning_rate_unet',
label: 'U-Net learning rate',
description: 'Learning rate for U-Net',
default: 1.5e-5,
minimum: 1e-6,
maximum: 1e-4,
step: 1e-6,
optional: true,
},
{
name: 'learning_rate_text',
label: 'Text encoder learning rate',
description: 'Learning rate for text encoder',
default: 2.5e-5,
minimum: 1e-6,
maximum: 1e-4,
step: 1e-6,
optional: true,
},
{
name: 'color_jitter',
label: 'Color jitter',
description: 'Color jitter',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'lr_scheduler',
label: 'LR scheduler',
description: 'Learning rate scheduler',
default: 'linear',
allowedValues: ['linear', 'cosine', 'cosine_with_restarts', 'polynomial', 'constant', 'constant_with_warmup'],
optional: true,
},
{
name: 'lr_warmup_steps',
label: 'Warmup steps',
description: 'Learning rate warmup steps',
default: 0,
minimum: 0,
maximum: 100,
optional: true,
},
// {
// name: 'placeholder_tokens',
// label: 'Placeholder tokens',
// description: 'Placeholder tokens for concept',
// default: '<person1>',
// optional: true,
// isRequired: true,
// },
// {
// name: 'use_mask_captioned_data',
// label: 'Use mask captioned data',
// description: 'Use mask captioned data',
// default: false,
// //allowedValues: [false, true],
// allowedValues: [false],
// optional: true,
// },
{
name: 'max_train_steps_ti',
label: 'Textual inversion max steps',
description: 'Max train steps for textual inversion',
default: 350,
minimum: 50,
maximum: 700,
optional: true,
},
{
name: 'max_train_steps_tuning',
label: 'Tuning max steps',
description: 'Max train steps for tuning (U-Net and text encoder)',
default: 700,
minimum: 50,
maximum: 1000,
optional: true,
},
{
name: 'clip_ti_decay',
label: 'CLIP textual inversion decay',
description: 'CLIP textual inversion decay',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'weight_decay_ti',
label: 'Textual inversion weight decay',
description: 'Weight decay for textual inversion (regularizes the ti embedding), higher values will look less like the concept, but improve promptability',
default: 0.0010,
minimum: 0.0001,
maximum: 0.005,
step: 0.0001,
optional: true,
},
{
name: 'weight_decay_lora',
label: 'Weight decay',
description: 'Weight decay for LORA matrices, (regularizes the model), higher values will look less like the concept, but improve promptability',
default: 0.0015,
minimum: 0.0001,
maximum: 0.01,
step: 0.001,
optional: true,
},
{
name: 'lora_rank_unet',
label: 'U-Net rank',
description: 'LORA rank for U-Net',
default: 3,
minimum: 1,
maximum: 16,
optional: true,
},
{
name: 'lora_rank_text_encoder',
label: 'Text encoder rank',
description: 'LORA rank for text encoder',
default: 8,
minimum: 1,
maximum: 16,
optional: true,
},
{
name: 'use_extended_lora',
label: 'Extended LORA',
description: 'Use extended LORA. (false for faces and objects, true for styles is recommended)',
default: false,
allowedValues: [false, true],
optional: true,
},
{
name: 'use_face_segmentation_condition',
label: 'Face segmentation',
description: 'Use face segmentation condition. Disable this when training styles / objects',
default: true,
allowedValues: [false, true],
optional: true,
}
]
const ttsParameters = [
{
name: 'text',
label: 'Text',
description: 'Text to synthesize as speech',
default: null,
isRequired: true,
},
{
name: 'preset',
label: 'Preset',
description: 'Speed vs quality mode',
default: 'standard',
allowedValues: ['ultra_fast', 'fast', 'standard', 'high_quality'],
},
{
name: 'voice',
label: 'Voice',
description: 'Name of the voice to use for synthesis',
default: 'random',
allowedValues: ['random', 'clone', 'angie', 'applejack', 'cond_latent_example', 'daniel', 'deniro', 'emma', 'freeman', 'geralt', 'halle', 'jlaw', 'lj', 'mol', 'myself', 'pat', 'pat2', 'rainbow', 'snakes', 'tim_reynolds', 'tom', 'train_atkins', 'train_daws', 'train_dotrice', 'train_dreams', 'train_empire', 'train_grace', 'train_kennard', 'train_lescault', 'train_mouse', 'weaver', 'william'],
},
{
name: 'voice_file_urls',
label: 'Voice file URLs',
description: 'URLs for the audio files of target voice (if voice is clone)',
mediaUpload: true,
default: [],
minLength: 1,
maxLength: 16,
},
{
name: 'seed',
label: 'Seed',
description: 'Set random seed for reproducibility. If blank, will be set randomly.',
default: null,
minimum: 0,
maximum: 1e8,
optional: true,
},
]
const ttsFastParameters = [
{
name: 'text',
label: 'Text',
description: 'Text to synthesize as speech',
default: null,
isRequired: true,
},
{
name: 'voice',
label: 'Voice',
description: 'Which preset voice to use',
default: 'Jordan',
allowedValues: ['Larry', 'Jordan', 'Susan', 'William', 'Oliver', 'Alfonso', 'Daniel', 'Charlotte', 'Adrian', 'Alexander', 'Anthony', 'Aurora', 'Axel', 'Carter', 'Daisy', 'Darcie', 'Ellie', 'Evelyn', 'Frankie', 'Frederick', 'Harrison', 'Hudson', 'Hunter', 'Julian', 'Lillian', 'Lottie', 'Maverick', 'Bret', 'Nolan', 'Nova', 'Owen', 'Phoebe', 'Stella', 'Theodore', 'Arthur', 'Bruce', 'Bryan', 'Carlo', 'Domenic', 'Hayden(Cooper)', 'Reynaldo'],
},
{
name: 'speed',
label: 'Speed',
description: 'Speed of voice talking',
default: 1.0,
minimum: 0.5,
maximum: 1.5,
optional: true,
},
{
name: 'preset',
label: 'Preset',
description: 'Quality vs speed mode',
default: 'high-quality',
allowedValues: ['real-time', 'balanced', 'low-latency', 'high-quality'],
optional: true,
},
]
const wav2lipParameters = [
{
name: 'face_url',
label: 'Face image file',
description: 'Image containing face to be avatar',
default: null,
mediaUpload: true,
isRequired: true,
},
{
name: 'speech_url',
label: 'Audio file',
description: 'Audio of speech to be lip-synced',
default: null,
mediaUpload: true,
isRequired: true,
},
{
name: 'gfpgan',
label: 'GFPGAN',
description: 'Apply GFPGAN to improve face image quality from Wav2Lip (recommended)',
default: true,
allowedValues: [false, true],
optional: true,
},
{
name: 'gfpgan_upscale',
label: 'Upscale',
description: 'Upsampling factor (only used if GFPGAN is enabled)',
default: 1.0,
allowedValues: [1.0, 2.0],
optional: true,
},
{
name: 'intro_text',
label: 'Intro text',
description: 'Add introductory text to wav2lip video (optional)',
default: null,
optional: true,
}
]
const completeParameters = [
{
name: 'prompt',
label: 'Prompt',
description: 'Prompt to complete with GPT-3',
default: null,
isRequired: true,
},
{
name: 'max_tokens',
label: 'Max tokens',
description: 'Maximum number of tokens to generate with GPT-3',
default: 150,
minimum: 1,
maximum: 2048,
optional: true,
},
{
name: 'temperature',
label: 'Temperature',
description: 'GPT-3 sampling temperature',
default: 0.9,
minimum: 0.0,
maximum: 1.0,
step: 0.01,
optional: true,
},
]
// Register generators
const createGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-pipelines',
versionId: 'f068c4e17cc465694f1ba17381f521f3bf538c1eb8c06170f08c990d570faffa',
mode: 'generate',
parameters: createParameters,
isDeprecated: false,
}
const createGenerator = {
generatorName: 'create',
description: 'Create an image from a prompt',
output: 'creation',
versions: [createGeneratorVersion],
}
const interpolateGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-pipelines',
versionId: 'f068c4e17cc465694f1ba17381f521f3bf538c1eb8c06170f08c990d570faffa',
mode: 'interpolate',
parameters: interpolationParameters,
isDeprecated: false,
}
const interpolateGenerator = {
generatorName: 'interpolate',
description: 'Create a video interpolation between two prompts',
output: 'creation',
versions: [interpolateGeneratorVersion],
}
const real2realGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-pipelines',
versionId: 'f068c4e17cc465694f1ba17381f521f3bf538c1eb8c06170f08c990d570faffa',
mode: 'real2real',
parameters: real2realParameters,
isDeprecated: false
}
const real2realGenerator = {
generatorName: 'real2real',
description: 'Create a video interpolation between two images',
output: 'creation',
versions: [real2realGeneratorVersion]
}
const remixGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-pipelines',
versionId: 'f068c4e17cc465694f1ba17381f521f3bf538c1eb8c06170f08c990d570faffa',
mode: 'remix',
parameters: remixParameters,
isDeprecated: false
}
const remixGenerator = {
generatorName: 'remix',
description: 'Generate a remix of an image',
output: 'creation',
versions: [remixGeneratorVersion]
}
const interrogateGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-pipelines',
versionId: 'f068c4e17cc465694f1ba17381f521f3bf538c1eb8c06170f08c990d570faffa',
mode: 'interrogate',
parameters: interrogateParameters,
isDeprecated: false
}
const interrogateGenerator = {
generatorName: 'interrogate',
description: 'Generate a prompt from an image',
output: 'creation',
versions: [interrogateGeneratorVersion]
}
const loraGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/eden-sd-lora',
versionId: '50ea1c9fd328dc17ac466ed0e1ef7bfdd906cc94b6fb307f39523ef21ca09d46',
mode: 'lora',
parameters: loraParameters,
isDeprecated: false
}
const loraGenerator = {
generatorName: 'lora',
description: 'Train a LORA finetuning from a set of images',
output: 'lora',
versions: [loraGeneratorVersion]
}
const ttsGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/tts',
versionId: '719cf3677389698d331878cda88c9f173bfea5d20f5695055013596436b321c5',
mode: 'tts',
parameters: ttsParameters,
isDeprecated: false
}
const ttsGenerator = {
generatorName: 'tts',
description: 'Generate a speech file from a text input',
output: 'creation',
versions: [ttsGeneratorVersion]
}
const ttsFastGeneratorVersion = {
provider: 'tts',
address: 'playHt/tts',
versionId: '1',
mode: 'tts_fast',
parameters: ttsFastParameters,
isDeprecated: false
}
const ttsFastGenerator = {
generatorName: 'tts_fast',
description: 'Generate a speech file from a text input (fast)',
output: 'creation',
versions: [ttsFastGeneratorVersion]
}
const wav2lipGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/character',
versionId: 'c06e12c0e39e46e4ce5469a17dfd6af5165d149bb42b069ecd8a6ab990e52450',
mode: 'wav2lip',
parameters: wav2lipParameters,
isDeprecated: false
}
const wav2lipGenerator = {
generatorName: 'wav2lip',
description: 'Lip-sync an image or video from a speech file',
output: 'creation',
versions: [wav2lipGeneratorVersion]
}
const completeGeneratorVersion = {
provider: 'replicate',
address: 'abraham-ai/character',
versionId: '959a4717d30a99331e162f051565eb286cfb19a2b0ab598d6fee369e510e0d75',
mode: 'complete',
parameters: completeParameters,
isDeprecated: false
}
const completeGenerator = {
generatorName: 'complete',
description: 'Generate a prompt completion with GPT',
output: 'llm',
versions: [completeGeneratorVersion]
}
db.generators.insertMany([
createGenerator,
interpolateGenerator,
real2realGenerator,
remixGenerator,
interrogateGenerator,
loraGenerator,
ttsGenerator,
wav2lipGenerator,
completeGenerator,
]);
db.generators.insertMany([
ttsFastGenerator,
]);
const wav2lipGeneratorVersion1 = {
provider: 'replicate',
address: 'abraham-ai/character',
versionId: 'c06e12c0e39e46e4ce5469a17dfd6af5165d149bb42b069ecd8a6ab990e52450',
mode: 'wav2lip',
parameters: wav2lipParameters,
isDeprecated: false
}
const filter = { generatorName: 'wav2lip' };
const update = { $push: { versions: wav2lipGeneratorVersion1 } };
// db.generators.updateOne(filter, update);
const completeGeneratorVersion1 = {
provider: 'llm',
address: 'openai/gpt3',
versionId: '1',
mode: 'complete',
parameters: completeParameters,
isDeprecated: false
}
const filter1 = { generatorName: 'complete' };
const update1 = { $push: { versions: completeGeneratorVersion1 } };
db.generators.updateOne(filter1, update1);
db.generators.updateOne(
{ generatorName: 'create' },
{ $push: { versions: createGeneratorVersion } }
);
db.generators.updateOne(