@scenario-labs/sdk 2.4.0-alpha.1 → 2.5.0
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/CHANGELOG.md +36 -0
- package/README.md +26 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/lib/cel/environment.d.mts +38 -0
- package/lib/cel/environment.d.mts.map +1 -0
- package/lib/cel/environment.d.ts +38 -0
- package/lib/cel/environment.d.ts.map +1 -0
- package/lib/cel/environment.js +52 -0
- package/lib/cel/environment.js.map +1 -0
- package/lib/cel/environment.mjs +48 -0
- package/lib/cel/environment.mjs.map +1 -0
- package/lib/cel/functions.d.mts +4 -0
- package/lib/cel/functions.d.mts.map +1 -0
- package/lib/cel/functions.d.ts +4 -0
- package/lib/cel/functions.d.ts.map +1 -0
- package/lib/cel/functions.js +67 -0
- package/lib/cel/functions.js.map +1 -0
- package/lib/cel/functions.mjs +64 -0
- package/lib/cel/functions.mjs.map +1 -0
- package/lib/cel/index.d.mts +3 -0
- package/lib/cel/index.d.mts.map +1 -0
- package/lib/cel/index.d.ts +3 -0
- package/lib/cel/index.d.ts.map +1 -0
- package/lib/cel/index.js +9 -0
- package/lib/cel/index.js.map +1 -0
- package/lib/cel/index.mjs +3 -0
- package/lib/cel/index.mjs.map +1 -0
- package/lib/cel/prng.d.mts +28 -0
- package/lib/cel/prng.d.mts.map +1 -0
- package/lib/cel/prng.d.ts +28 -0
- package/lib/cel/prng.d.ts.map +1 -0
- package/lib/cel/prng.js +64 -0
- package/lib/cel/prng.js.map +1 -0
- package/lib/cel/prng.mjs +58 -0
- package/lib/cel/prng.mjs.map +1 -0
- package/lib/workflow_converter.d.mts +3 -0
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts +3 -0
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +62 -34
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +62 -34
- package/lib/workflow_converter.mjs.map +1 -1
- package/package.json +17 -2
- package/resources/assets/assets.d.mts +269 -31
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +269 -31
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/generate.d.mts +157 -51
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +157 -51
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +1 -5
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +1 -5
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/jobs.d.mts +30 -12
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +30 -12
- package/resources/jobs.d.ts.map +1 -1
- package/resources/models/description.d.mts +62 -4
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +62 -4
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +94 -64
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +94 -64
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +239 -295
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +239 -295
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +92 -110
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +92 -110
- package/resources/models/train.d.ts.map +1 -1
- package/resources/search.d.mts +2 -2
- package/resources/search.d.ts +2 -2
- package/resources/uploads.d.mts +2 -3
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +2 -3
- package/resources/uploads.d.ts.map +1 -1
- package/resources/usages.d.mts +44 -15
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +44 -15
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +63 -45
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +63 -45
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +4 -4
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +4 -4
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +1 -1
- package/src/lib/cel/environment.ts +81 -0
- package/src/lib/cel/functions.ts +109 -0
- package/src/lib/cel/index.ts +8 -0
- package/src/lib/cel/prng.ts +62 -0
- package/src/lib/workflow_converter.ts +91 -35
- package/src/resources/assets/assets.ts +300 -62
- package/src/resources/generate.ts +157 -129
- package/src/resources/index.ts +1 -1
- package/src/resources/jobs.ts +27 -37
- package/src/resources/models/description.ts +70 -12
- package/src/resources/models/examples.ts +100 -88
- package/src/resources/models/models.ts +228 -385
- package/src/resources/models/train.ts +89 -139
- package/src/resources/search.ts +2 -2
- package/src/resources/uploads.ts +2 -3
- package/src/resources/usages.ts +47 -20
- package/src/resources/workflows.ts +48 -157
- package/src/tools/cel.ts +4 -0
- package/src/version.ts +1 -1
- package/tools/cel.d.mts +2 -0
- package/tools/cel.d.mts.map +1 -0
- package/tools/cel.d.ts +2 -0
- package/tools/cel.d.ts.map +1 -0
- package/tools/cel.js +8 -0
- package/tools/cel.js.map +1 -0
- package/tools/cel.mjs +5 -0
- package/tools/cel.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -168,12 +168,6 @@ export namespace TrainActionResponse {
|
|
|
168
168
|
| 'qwen-image-edit-2511-lora'
|
|
169
169
|
| 'qwen-image-edit-lora'
|
|
170
170
|
| 'qwen-image-lora'
|
|
171
|
-
| 'sd-1_5'
|
|
172
|
-
| 'sd-1_5-composition'
|
|
173
|
-
| 'sd-1_5-lora'
|
|
174
|
-
| 'sd-xl'
|
|
175
|
-
| 'sd-xl-composition'
|
|
176
|
-
| 'sd-xl-lora'
|
|
177
171
|
| 'zimage-de-turbo-lora'
|
|
178
172
|
| 'zimage-lora'
|
|
179
173
|
| 'zimage-turbo-lora';
|
|
@@ -211,6 +205,13 @@ export namespace TrainActionResponse {
|
|
|
211
205
|
*/
|
|
212
206
|
concepts?: Array<Model.Concept>;
|
|
213
207
|
|
|
208
|
+
/**
|
|
209
|
+
* When true, credits spent on a generation with this model are not automatically
|
|
210
|
+
* refunded if the generation fails. Absent or false means failed generations are
|
|
211
|
+
* refunded as usual.
|
|
212
|
+
*/
|
|
213
|
+
disableRefund?: boolean;
|
|
214
|
+
|
|
214
215
|
/**
|
|
215
216
|
* The epoch of the model. Only available for Flux Lora Trained models. If not set,
|
|
216
217
|
* uses the final model epoch (latest)
|
|
@@ -333,7 +334,7 @@ export namespace TrainActionResponse {
|
|
|
333
334
|
conceptPrompt: string;
|
|
334
335
|
|
|
335
336
|
/**
|
|
336
|
-
* The model ID of the class
|
|
337
|
+
* The model ID of the class. Only available for legacy models.
|
|
337
338
|
*/
|
|
338
339
|
modelId: string;
|
|
339
340
|
|
|
@@ -576,12 +577,6 @@ export namespace TrainActionResponse {
|
|
|
576
577
|
| 'qwen-image-edit-2511-lora'
|
|
577
578
|
| 'qwen-image-edit-lora'
|
|
578
579
|
| 'qwen-image-lora'
|
|
579
|
-
| 'sd-1_5'
|
|
580
|
-
| 'sd-1_5-composition'
|
|
581
|
-
| 'sd-1_5-lora'
|
|
582
|
-
| 'sd-xl'
|
|
583
|
-
| 'sd-xl-composition'
|
|
584
|
-
| 'sd-xl-lora'
|
|
585
580
|
| 'zimage-de-turbo-lora'
|
|
586
581
|
| 'zimage-lora'
|
|
587
582
|
| 'zimage-turbo-lora'
|
|
@@ -698,7 +693,7 @@ export namespace TrainActionResponse {
|
|
|
698
693
|
/**
|
|
699
694
|
* The prompt to specify images in the same class as provided instance images
|
|
700
695
|
*
|
|
701
|
-
*
|
|
696
|
+
* Deprecated legacy training parameter.
|
|
702
697
|
*/
|
|
703
698
|
classPrompt?: string;
|
|
704
699
|
|
|
@@ -714,11 +709,8 @@ export namespace TrainActionResponse {
|
|
|
714
709
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
715
710
|
* (example: "a daiton dog")
|
|
716
711
|
*
|
|
717
|
-
* Default value varies depending on the model type
|
|
718
|
-
*
|
|
719
|
-
* - For SD1.5: "daiton" if no class is associated with the model
|
|
720
|
-
* - For SDXL: "daiton"
|
|
721
|
-
* - For Flux: ""
|
|
712
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
713
|
+
* an empty string.
|
|
722
714
|
*/
|
|
723
715
|
conceptPrompt?: string;
|
|
724
716
|
|
|
@@ -739,32 +731,30 @@ export namespace TrainActionResponse {
|
|
|
739
731
|
/**
|
|
740
732
|
* Initial learning rate (after the potential warmup period)
|
|
741
733
|
*
|
|
742
|
-
* Default value varies depending on the model type
|
|
743
|
-
*
|
|
744
|
-
* - For SD1.5 and SDXL: 0.000005
|
|
745
|
-
* - For Flux: 0.0001
|
|
734
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
735
|
+
* 0.0001.
|
|
746
736
|
*/
|
|
747
737
|
learningRate?: number;
|
|
748
738
|
|
|
749
739
|
/**
|
|
750
740
|
* Initial learning rate (after the potential warmup period) for the text encoder
|
|
751
741
|
*
|
|
752
|
-
* Maximum [Flux LoRA: 0.001] Default [
|
|
753
|
-
*
|
|
742
|
+
* Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA:
|
|
743
|
+
* 0.000001]
|
|
754
744
|
*/
|
|
755
745
|
learningRateTextEncoder?: number;
|
|
756
746
|
|
|
757
747
|
/**
|
|
758
748
|
* Initial learning rate (after the potential warmup period) for the UNet
|
|
759
749
|
*
|
|
760
|
-
*
|
|
750
|
+
* Deprecated legacy training parameter.
|
|
761
751
|
*/
|
|
762
752
|
learningRateUnet?: number;
|
|
763
753
|
|
|
764
754
|
/**
|
|
765
755
|
* The scheduler type to use (default: "constant")
|
|
766
756
|
*
|
|
767
|
-
*
|
|
757
|
+
* Deprecated legacy training parameter.
|
|
768
758
|
*/
|
|
769
759
|
lrScheduler?:
|
|
770
760
|
| 'constant'
|
|
@@ -778,18 +768,12 @@ export namespace TrainActionResponse {
|
|
|
778
768
|
* Maximum number of training steps to execute (default: varies depending on the
|
|
779
769
|
* model type)
|
|
780
770
|
*
|
|
781
|
-
* For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
782
|
-
* instead
|
|
783
|
-
*
|
|
784
771
|
* Default value varies depending on the model type:
|
|
785
772
|
*
|
|
786
|
-
* - For SD1.5: round((number of training images \* 225) / 3)
|
|
787
|
-
* - For SDXL: number of training images \* 175
|
|
788
773
|
* - For Flux: number of training images \* 100
|
|
789
774
|
*
|
|
790
775
|
* Maximum value varies depending on the model type:
|
|
791
776
|
*
|
|
792
|
-
* - For SD1.5 and SDXL: [0, 40000]
|
|
793
777
|
* - For Flux: [0, 10000]
|
|
794
778
|
*/
|
|
795
779
|
maxTrainSteps?: number;
|
|
@@ -811,14 +795,14 @@ export namespace TrainActionResponse {
|
|
|
811
795
|
/**
|
|
812
796
|
* The number of training steps for the text encoder
|
|
813
797
|
*
|
|
814
|
-
*
|
|
798
|
+
* Deprecated legacy training parameter.
|
|
815
799
|
*/
|
|
816
800
|
numTextTrainSteps?: number;
|
|
817
801
|
|
|
818
802
|
/**
|
|
819
803
|
* The number of training steps for the UNet
|
|
820
804
|
*
|
|
821
|
-
*
|
|
805
|
+
* Deprecated legacy training parameter.
|
|
822
806
|
*/
|
|
823
807
|
numUNetTrainSteps?: number;
|
|
824
808
|
|
|
@@ -841,7 +825,7 @@ export namespace TrainActionResponse {
|
|
|
841
825
|
/**
|
|
842
826
|
* The weight of prior preservation loss
|
|
843
827
|
*
|
|
844
|
-
*
|
|
828
|
+
* Deprecated legacy training parameter.
|
|
845
829
|
*/
|
|
846
830
|
priorLossWeight?: number;
|
|
847
831
|
|
|
@@ -849,32 +833,31 @@ export namespace TrainActionResponse {
|
|
|
849
833
|
* Whether to random crop or center crop images before resizing to the working
|
|
850
834
|
* resolution
|
|
851
835
|
*
|
|
852
|
-
*
|
|
836
|
+
* Deprecated legacy training parameter.
|
|
853
837
|
*/
|
|
854
838
|
randomCrop?: boolean;
|
|
855
839
|
|
|
856
840
|
/**
|
|
857
841
|
* Ratio of random crops
|
|
858
842
|
*
|
|
859
|
-
*
|
|
843
|
+
* Deprecated legacy training parameter.
|
|
860
844
|
*/
|
|
861
845
|
randomCropRatio?: number;
|
|
862
846
|
|
|
863
847
|
/**
|
|
864
848
|
* Scale of random crops
|
|
865
849
|
*
|
|
866
|
-
*
|
|
850
|
+
* Deprecated legacy training parameter.
|
|
867
851
|
*/
|
|
868
852
|
randomCropScale?: number;
|
|
869
853
|
|
|
870
854
|
/**
|
|
871
855
|
* The dimension of the LoRA update matrices
|
|
872
856
|
*
|
|
873
|
-
* Only available for
|
|
857
|
+
* Only available for Flux LoRA and Musubi training
|
|
874
858
|
*
|
|
875
859
|
* Default value varies depending on the model type:
|
|
876
860
|
*
|
|
877
|
-
* - For SDXL (deprecated): 64
|
|
878
861
|
* - For Flux: 16
|
|
879
862
|
* - For Musubi: 64
|
|
880
863
|
*
|
|
@@ -907,14 +890,14 @@ export namespace TrainActionResponse {
|
|
|
907
890
|
*
|
|
908
891
|
* Note: Legacy parameter, will be ignored
|
|
909
892
|
*
|
|
910
|
-
*
|
|
893
|
+
* Deprecated legacy training parameter.
|
|
911
894
|
*/
|
|
912
895
|
scaleLr?: boolean;
|
|
913
896
|
|
|
914
897
|
/**
|
|
915
898
|
* Used to reproduce previous results. Default: randomly generated number.
|
|
916
899
|
*
|
|
917
|
-
*
|
|
900
|
+
* Deprecated legacy training parameter.
|
|
918
901
|
*/
|
|
919
902
|
seed?: number;
|
|
920
903
|
|
|
@@ -926,21 +909,21 @@ export namespace TrainActionResponse {
|
|
|
926
909
|
*
|
|
927
910
|
* Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
928
911
|
*
|
|
929
|
-
*
|
|
912
|
+
* Deprecated legacy training parameter.
|
|
930
913
|
*/
|
|
931
914
|
textEncoderTrainingRatio?: number;
|
|
932
915
|
|
|
933
916
|
/**
|
|
934
917
|
* Validation frequency. Cannot be greater than maxTrainSteps value
|
|
935
918
|
*
|
|
936
|
-
*
|
|
919
|
+
* Deprecated legacy training parameter.
|
|
937
920
|
*/
|
|
938
921
|
validationFrequency?: number;
|
|
939
922
|
|
|
940
923
|
/**
|
|
941
924
|
* Validation prompt
|
|
942
925
|
*
|
|
943
|
-
*
|
|
926
|
+
* Deprecated legacy training parameter.
|
|
944
927
|
*/
|
|
945
928
|
validationPrompt?: string;
|
|
946
929
|
|
|
@@ -1377,12 +1360,12 @@ export interface TrainTriggerResponse {
|
|
|
1377
1360
|
model: TrainTriggerResponse.Model;
|
|
1378
1361
|
|
|
1379
1362
|
/**
|
|
1380
|
-
* The
|
|
1363
|
+
* The Compute Units cost for the request billed
|
|
1381
1364
|
*/
|
|
1382
1365
|
creativeUnitsCost?: number;
|
|
1383
1366
|
|
|
1384
1367
|
/**
|
|
1385
|
-
* The
|
|
1368
|
+
* The Compute Units discount for the request billed
|
|
1386
1369
|
*/
|
|
1387
1370
|
creativeUnitsDiscount?: number;
|
|
1388
1371
|
|
|
@@ -1439,6 +1422,7 @@ export namespace TrainTriggerResponse {
|
|
|
1439
1422
|
| 'skybox-base-360'
|
|
1440
1423
|
| 'skybox-hdri'
|
|
1441
1424
|
| 'skybox-upscale-360'
|
|
1425
|
+
| 'splat'
|
|
1442
1426
|
| 'texture'
|
|
1443
1427
|
| 'translate'
|
|
1444
1428
|
| 'upload'
|
|
@@ -1846,12 +1830,6 @@ export namespace TrainTriggerResponse {
|
|
|
1846
1830
|
| 'qwen-image-edit-2511-lora'
|
|
1847
1831
|
| 'qwen-image-edit-lora'
|
|
1848
1832
|
| 'qwen-image-lora'
|
|
1849
|
-
| 'sd-1_5'
|
|
1850
|
-
| 'sd-1_5-composition'
|
|
1851
|
-
| 'sd-1_5-lora'
|
|
1852
|
-
| 'sd-xl'
|
|
1853
|
-
| 'sd-xl-composition'
|
|
1854
|
-
| 'sd-xl-lora'
|
|
1855
1833
|
| 'zimage-de-turbo-lora'
|
|
1856
1834
|
| 'zimage-lora'
|
|
1857
1835
|
| 'zimage-turbo-lora'
|
|
@@ -2079,12 +2057,6 @@ export namespace TrainTriggerResponse {
|
|
|
2079
2057
|
| 'qwen-image-edit-2511-lora'
|
|
2080
2058
|
| 'qwen-image-edit-lora'
|
|
2081
2059
|
| 'qwen-image-lora'
|
|
2082
|
-
| 'sd-1_5'
|
|
2083
|
-
| 'sd-1_5-composition'
|
|
2084
|
-
| 'sd-1_5-lora'
|
|
2085
|
-
| 'sd-xl'
|
|
2086
|
-
| 'sd-xl-composition'
|
|
2087
|
-
| 'sd-xl-lora'
|
|
2088
2060
|
| 'zimage-de-turbo-lora'
|
|
2089
2061
|
| 'zimage-lora'
|
|
2090
2062
|
| 'zimage-turbo-lora'
|
|
@@ -2350,6 +2322,13 @@ export namespace TrainTriggerResponse {
|
|
|
2350
2322
|
cuCost: number;
|
|
2351
2323
|
|
|
2352
2324
|
cuDiscount: number;
|
|
2325
|
+
|
|
2326
|
+
/**
|
|
2327
|
+
* When true, the credits charged for this job are not automatically refunded if
|
|
2328
|
+
* the generation fails, because the model used does not support refund-on-failure.
|
|
2329
|
+
* Absent or false means a failed generation is refunded as usual.
|
|
2330
|
+
*/
|
|
2331
|
+
disableRefund?: boolean;
|
|
2353
2332
|
}
|
|
2354
2333
|
}
|
|
2355
2334
|
|
|
@@ -2477,12 +2456,6 @@ export namespace TrainTriggerResponse {
|
|
|
2477
2456
|
| 'qwen-image-edit-2511-lora'
|
|
2478
2457
|
| 'qwen-image-edit-lora'
|
|
2479
2458
|
| 'qwen-image-lora'
|
|
2480
|
-
| 'sd-1_5'
|
|
2481
|
-
| 'sd-1_5-composition'
|
|
2482
|
-
| 'sd-1_5-lora'
|
|
2483
|
-
| 'sd-xl'
|
|
2484
|
-
| 'sd-xl-composition'
|
|
2485
|
-
| 'sd-xl-lora'
|
|
2486
2459
|
| 'zimage-de-turbo-lora'
|
|
2487
2460
|
| 'zimage-lora'
|
|
2488
2461
|
| 'zimage-turbo-lora';
|
|
@@ -2520,6 +2493,13 @@ export namespace TrainTriggerResponse {
|
|
|
2520
2493
|
*/
|
|
2521
2494
|
concepts?: Array<Model.Concept>;
|
|
2522
2495
|
|
|
2496
|
+
/**
|
|
2497
|
+
* When true, credits spent on a generation with this model are not automatically
|
|
2498
|
+
* refunded if the generation fails. Absent or false means failed generations are
|
|
2499
|
+
* refunded as usual.
|
|
2500
|
+
*/
|
|
2501
|
+
disableRefund?: boolean;
|
|
2502
|
+
|
|
2523
2503
|
/**
|
|
2524
2504
|
* The epoch of the model. Only available for Flux Lora Trained models. If not set,
|
|
2525
2505
|
* uses the final model epoch (latest)
|
|
@@ -2642,7 +2622,7 @@ export namespace TrainTriggerResponse {
|
|
|
2642
2622
|
conceptPrompt: string;
|
|
2643
2623
|
|
|
2644
2624
|
/**
|
|
2645
|
-
* The model ID of the class
|
|
2625
|
+
* The model ID of the class. Only available for legacy models.
|
|
2646
2626
|
*/
|
|
2647
2627
|
modelId: string;
|
|
2648
2628
|
|
|
@@ -2885,12 +2865,6 @@ export namespace TrainTriggerResponse {
|
|
|
2885
2865
|
| 'qwen-image-edit-2511-lora'
|
|
2886
2866
|
| 'qwen-image-edit-lora'
|
|
2887
2867
|
| 'qwen-image-lora'
|
|
2888
|
-
| 'sd-1_5'
|
|
2889
|
-
| 'sd-1_5-composition'
|
|
2890
|
-
| 'sd-1_5-lora'
|
|
2891
|
-
| 'sd-xl'
|
|
2892
|
-
| 'sd-xl-composition'
|
|
2893
|
-
| 'sd-xl-lora'
|
|
2894
2868
|
| 'zimage-de-turbo-lora'
|
|
2895
2869
|
| 'zimage-lora'
|
|
2896
2870
|
| 'zimage-turbo-lora'
|
|
@@ -3007,7 +2981,7 @@ export namespace TrainTriggerResponse {
|
|
|
3007
2981
|
/**
|
|
3008
2982
|
* The prompt to specify images in the same class as provided instance images
|
|
3009
2983
|
*
|
|
3010
|
-
*
|
|
2984
|
+
* Deprecated legacy training parameter.
|
|
3011
2985
|
*/
|
|
3012
2986
|
classPrompt?: string;
|
|
3013
2987
|
|
|
@@ -3023,11 +2997,8 @@ export namespace TrainTriggerResponse {
|
|
|
3023
2997
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
3024
2998
|
* (example: "a daiton dog")
|
|
3025
2999
|
*
|
|
3026
|
-
* Default value varies depending on the model type
|
|
3027
|
-
*
|
|
3028
|
-
* - For SD1.5: "daiton" if no class is associated with the model
|
|
3029
|
-
* - For SDXL: "daiton"
|
|
3030
|
-
* - For Flux: ""
|
|
3000
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
3001
|
+
* an empty string.
|
|
3031
3002
|
*/
|
|
3032
3003
|
conceptPrompt?: string;
|
|
3033
3004
|
|
|
@@ -3048,32 +3019,30 @@ export namespace TrainTriggerResponse {
|
|
|
3048
3019
|
/**
|
|
3049
3020
|
* Initial learning rate (after the potential warmup period)
|
|
3050
3021
|
*
|
|
3051
|
-
* Default value varies depending on the model type
|
|
3052
|
-
*
|
|
3053
|
-
* - For SD1.5 and SDXL: 0.000005
|
|
3054
|
-
* - For Flux: 0.0001
|
|
3022
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
3023
|
+
* 0.0001.
|
|
3055
3024
|
*/
|
|
3056
3025
|
learningRate?: number;
|
|
3057
3026
|
|
|
3058
3027
|
/**
|
|
3059
3028
|
* Initial learning rate (after the potential warmup period) for the text encoder
|
|
3060
3029
|
*
|
|
3061
|
-
* Maximum [Flux LoRA: 0.001] Default [
|
|
3062
|
-
*
|
|
3030
|
+
* Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA:
|
|
3031
|
+
* 0.000001]
|
|
3063
3032
|
*/
|
|
3064
3033
|
learningRateTextEncoder?: number;
|
|
3065
3034
|
|
|
3066
3035
|
/**
|
|
3067
3036
|
* Initial learning rate (after the potential warmup period) for the UNet
|
|
3068
3037
|
*
|
|
3069
|
-
*
|
|
3038
|
+
* Deprecated legacy training parameter.
|
|
3070
3039
|
*/
|
|
3071
3040
|
learningRateUnet?: number;
|
|
3072
3041
|
|
|
3073
3042
|
/**
|
|
3074
3043
|
* The scheduler type to use (default: "constant")
|
|
3075
3044
|
*
|
|
3076
|
-
*
|
|
3045
|
+
* Deprecated legacy training parameter.
|
|
3077
3046
|
*/
|
|
3078
3047
|
lrScheduler?:
|
|
3079
3048
|
| 'constant'
|
|
@@ -3087,18 +3056,12 @@ export namespace TrainTriggerResponse {
|
|
|
3087
3056
|
* Maximum number of training steps to execute (default: varies depending on the
|
|
3088
3057
|
* model type)
|
|
3089
3058
|
*
|
|
3090
|
-
* For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
3091
|
-
* instead
|
|
3092
|
-
*
|
|
3093
3059
|
* Default value varies depending on the model type:
|
|
3094
3060
|
*
|
|
3095
|
-
* - For SD1.5: round((number of training images \* 225) / 3)
|
|
3096
|
-
* - For SDXL: number of training images \* 175
|
|
3097
3061
|
* - For Flux: number of training images \* 100
|
|
3098
3062
|
*
|
|
3099
3063
|
* Maximum value varies depending on the model type:
|
|
3100
3064
|
*
|
|
3101
|
-
* - For SD1.5 and SDXL: [0, 40000]
|
|
3102
3065
|
* - For Flux: [0, 10000]
|
|
3103
3066
|
*/
|
|
3104
3067
|
maxTrainSteps?: number;
|
|
@@ -3120,14 +3083,14 @@ export namespace TrainTriggerResponse {
|
|
|
3120
3083
|
/**
|
|
3121
3084
|
* The number of training steps for the text encoder
|
|
3122
3085
|
*
|
|
3123
|
-
*
|
|
3086
|
+
* Deprecated legacy training parameter.
|
|
3124
3087
|
*/
|
|
3125
3088
|
numTextTrainSteps?: number;
|
|
3126
3089
|
|
|
3127
3090
|
/**
|
|
3128
3091
|
* The number of training steps for the UNet
|
|
3129
3092
|
*
|
|
3130
|
-
*
|
|
3093
|
+
* Deprecated legacy training parameter.
|
|
3131
3094
|
*/
|
|
3132
3095
|
numUNetTrainSteps?: number;
|
|
3133
3096
|
|
|
@@ -3150,7 +3113,7 @@ export namespace TrainTriggerResponse {
|
|
|
3150
3113
|
/**
|
|
3151
3114
|
* The weight of prior preservation loss
|
|
3152
3115
|
*
|
|
3153
|
-
*
|
|
3116
|
+
* Deprecated legacy training parameter.
|
|
3154
3117
|
*/
|
|
3155
3118
|
priorLossWeight?: number;
|
|
3156
3119
|
|
|
@@ -3158,32 +3121,31 @@ export namespace TrainTriggerResponse {
|
|
|
3158
3121
|
* Whether to random crop or center crop images before resizing to the working
|
|
3159
3122
|
* resolution
|
|
3160
3123
|
*
|
|
3161
|
-
*
|
|
3124
|
+
* Deprecated legacy training parameter.
|
|
3162
3125
|
*/
|
|
3163
3126
|
randomCrop?: boolean;
|
|
3164
3127
|
|
|
3165
3128
|
/**
|
|
3166
3129
|
* Ratio of random crops
|
|
3167
3130
|
*
|
|
3168
|
-
*
|
|
3131
|
+
* Deprecated legacy training parameter.
|
|
3169
3132
|
*/
|
|
3170
3133
|
randomCropRatio?: number;
|
|
3171
3134
|
|
|
3172
3135
|
/**
|
|
3173
3136
|
* Scale of random crops
|
|
3174
3137
|
*
|
|
3175
|
-
*
|
|
3138
|
+
* Deprecated legacy training parameter.
|
|
3176
3139
|
*/
|
|
3177
3140
|
randomCropScale?: number;
|
|
3178
3141
|
|
|
3179
3142
|
/**
|
|
3180
3143
|
* The dimension of the LoRA update matrices
|
|
3181
3144
|
*
|
|
3182
|
-
* Only available for
|
|
3145
|
+
* Only available for Flux LoRA and Musubi training
|
|
3183
3146
|
*
|
|
3184
3147
|
* Default value varies depending on the model type:
|
|
3185
3148
|
*
|
|
3186
|
-
* - For SDXL (deprecated): 64
|
|
3187
3149
|
* - For Flux: 16
|
|
3188
3150
|
* - For Musubi: 64
|
|
3189
3151
|
*
|
|
@@ -3216,14 +3178,14 @@ export namespace TrainTriggerResponse {
|
|
|
3216
3178
|
*
|
|
3217
3179
|
* Note: Legacy parameter, will be ignored
|
|
3218
3180
|
*
|
|
3219
|
-
*
|
|
3181
|
+
* Deprecated legacy training parameter.
|
|
3220
3182
|
*/
|
|
3221
3183
|
scaleLr?: boolean;
|
|
3222
3184
|
|
|
3223
3185
|
/**
|
|
3224
3186
|
* Used to reproduce previous results. Default: randomly generated number.
|
|
3225
3187
|
*
|
|
3226
|
-
*
|
|
3188
|
+
* Deprecated legacy training parameter.
|
|
3227
3189
|
*/
|
|
3228
3190
|
seed?: number;
|
|
3229
3191
|
|
|
@@ -3235,21 +3197,21 @@ export namespace TrainTriggerResponse {
|
|
|
3235
3197
|
*
|
|
3236
3198
|
* Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
3237
3199
|
*
|
|
3238
|
-
*
|
|
3200
|
+
* Deprecated legacy training parameter.
|
|
3239
3201
|
*/
|
|
3240
3202
|
textEncoderTrainingRatio?: number;
|
|
3241
3203
|
|
|
3242
3204
|
/**
|
|
3243
3205
|
* Validation frequency. Cannot be greater than maxTrainSteps value
|
|
3244
3206
|
*
|
|
3245
|
-
*
|
|
3207
|
+
* Deprecated legacy training parameter.
|
|
3246
3208
|
*/
|
|
3247
3209
|
validationFrequency?: number;
|
|
3248
3210
|
|
|
3249
3211
|
/**
|
|
3250
3212
|
* Validation prompt
|
|
3251
3213
|
*
|
|
3252
|
-
*
|
|
3214
|
+
* Deprecated legacy training parameter.
|
|
3253
3215
|
*/
|
|
3254
3216
|
validationPrompt?: string;
|
|
3255
3217
|
|
|
@@ -3811,7 +3773,7 @@ export namespace TrainTriggerParams {
|
|
|
3811
3773
|
/**
|
|
3812
3774
|
* The prompt to specify images in the same class as provided instance images
|
|
3813
3775
|
*
|
|
3814
|
-
*
|
|
3776
|
+
* Deprecated legacy training parameter.
|
|
3815
3777
|
*/
|
|
3816
3778
|
classPrompt?: string;
|
|
3817
3779
|
|
|
@@ -3827,11 +3789,8 @@ export namespace TrainTriggerParams {
|
|
|
3827
3789
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
3828
3790
|
* (example: "a daiton dog")
|
|
3829
3791
|
*
|
|
3830
|
-
* Default value varies depending on the model type
|
|
3831
|
-
*
|
|
3832
|
-
* - For SD1.5: "daiton" if no class is associated with the model
|
|
3833
|
-
* - For SDXL: "daiton"
|
|
3834
|
-
* - For Flux: ""
|
|
3792
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
3793
|
+
* an empty string.
|
|
3835
3794
|
*/
|
|
3836
3795
|
conceptPrompt?: string;
|
|
3837
3796
|
|
|
@@ -3852,32 +3811,30 @@ export namespace TrainTriggerParams {
|
|
|
3852
3811
|
/**
|
|
3853
3812
|
* Initial learning rate (after the potential warmup period)
|
|
3854
3813
|
*
|
|
3855
|
-
* Default value varies depending on the model type
|
|
3856
|
-
*
|
|
3857
|
-
* - For SD1.5 and SDXL: 0.000005
|
|
3858
|
-
* - For Flux: 0.0001
|
|
3814
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
3815
|
+
* 0.0001.
|
|
3859
3816
|
*/
|
|
3860
3817
|
learningRate?: number;
|
|
3861
3818
|
|
|
3862
3819
|
/**
|
|
3863
3820
|
* Initial learning rate (after the potential warmup period) for the text encoder
|
|
3864
3821
|
*
|
|
3865
|
-
* Maximum [Flux LoRA: 0.001] Default [
|
|
3866
|
-
*
|
|
3822
|
+
* Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA:
|
|
3823
|
+
* 0.000001]
|
|
3867
3824
|
*/
|
|
3868
3825
|
learningRateTextEncoder?: number;
|
|
3869
3826
|
|
|
3870
3827
|
/**
|
|
3871
3828
|
* Initial learning rate (after the potential warmup period) for the UNet
|
|
3872
3829
|
*
|
|
3873
|
-
*
|
|
3830
|
+
* Deprecated legacy training parameter.
|
|
3874
3831
|
*/
|
|
3875
3832
|
learningRateUnet?: number;
|
|
3876
3833
|
|
|
3877
3834
|
/**
|
|
3878
3835
|
* The scheduler type to use (default: "constant")
|
|
3879
3836
|
*
|
|
3880
|
-
*
|
|
3837
|
+
* Deprecated legacy training parameter.
|
|
3881
3838
|
*/
|
|
3882
3839
|
lrScheduler?:
|
|
3883
3840
|
| 'constant'
|
|
@@ -3891,18 +3848,12 @@ export namespace TrainTriggerParams {
|
|
|
3891
3848
|
* Maximum number of training steps to execute (default: varies depending on the
|
|
3892
3849
|
* model type)
|
|
3893
3850
|
*
|
|
3894
|
-
* For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
3895
|
-
* instead
|
|
3896
|
-
*
|
|
3897
3851
|
* Default value varies depending on the model type:
|
|
3898
3852
|
*
|
|
3899
|
-
* - For SD1.5: round((number of training images \* 225) / 3)
|
|
3900
|
-
* - For SDXL: number of training images \* 175
|
|
3901
3853
|
* - For Flux: number of training images \* 100
|
|
3902
3854
|
*
|
|
3903
3855
|
* Maximum value varies depending on the model type:
|
|
3904
3856
|
*
|
|
3905
|
-
* - For SD1.5 and SDXL: [0, 40000]
|
|
3906
3857
|
* - For Flux: [0, 10000]
|
|
3907
3858
|
*/
|
|
3908
3859
|
maxTrainSteps?: number;
|
|
@@ -3924,14 +3875,14 @@ export namespace TrainTriggerParams {
|
|
|
3924
3875
|
/**
|
|
3925
3876
|
* The number of training steps for the text encoder
|
|
3926
3877
|
*
|
|
3927
|
-
*
|
|
3878
|
+
* Deprecated legacy training parameter.
|
|
3928
3879
|
*/
|
|
3929
3880
|
numTextTrainSteps?: number;
|
|
3930
3881
|
|
|
3931
3882
|
/**
|
|
3932
3883
|
* The number of training steps for the UNet
|
|
3933
3884
|
*
|
|
3934
|
-
*
|
|
3885
|
+
* Deprecated legacy training parameter.
|
|
3935
3886
|
*/
|
|
3936
3887
|
numUNetTrainSteps?: number;
|
|
3937
3888
|
|
|
@@ -3954,7 +3905,7 @@ export namespace TrainTriggerParams {
|
|
|
3954
3905
|
/**
|
|
3955
3906
|
* The weight of prior preservation loss
|
|
3956
3907
|
*
|
|
3957
|
-
*
|
|
3908
|
+
* Deprecated legacy training parameter.
|
|
3958
3909
|
*/
|
|
3959
3910
|
priorLossWeight?: number;
|
|
3960
3911
|
|
|
@@ -3962,32 +3913,31 @@ export namespace TrainTriggerParams {
|
|
|
3962
3913
|
* Whether to random crop or center crop images before resizing to the working
|
|
3963
3914
|
* resolution
|
|
3964
3915
|
*
|
|
3965
|
-
*
|
|
3916
|
+
* Deprecated legacy training parameter.
|
|
3966
3917
|
*/
|
|
3967
3918
|
randomCrop?: boolean;
|
|
3968
3919
|
|
|
3969
3920
|
/**
|
|
3970
3921
|
* Ratio of random crops
|
|
3971
3922
|
*
|
|
3972
|
-
*
|
|
3923
|
+
* Deprecated legacy training parameter.
|
|
3973
3924
|
*/
|
|
3974
3925
|
randomCropRatio?: number;
|
|
3975
3926
|
|
|
3976
3927
|
/**
|
|
3977
3928
|
* Scale of random crops
|
|
3978
3929
|
*
|
|
3979
|
-
*
|
|
3930
|
+
* Deprecated legacy training parameter.
|
|
3980
3931
|
*/
|
|
3981
3932
|
randomCropScale?: number;
|
|
3982
3933
|
|
|
3983
3934
|
/**
|
|
3984
3935
|
* The dimension of the LoRA update matrices
|
|
3985
3936
|
*
|
|
3986
|
-
* Only available for
|
|
3937
|
+
* Only available for Flux LoRA and Musubi training
|
|
3987
3938
|
*
|
|
3988
3939
|
* Default value varies depending on the model type:
|
|
3989
3940
|
*
|
|
3990
|
-
* - For SDXL (deprecated): 64
|
|
3991
3941
|
* - For Flux: 16
|
|
3992
3942
|
* - For Musubi: 64
|
|
3993
3943
|
*
|
|
@@ -4020,14 +3970,14 @@ export namespace TrainTriggerParams {
|
|
|
4020
3970
|
*
|
|
4021
3971
|
* Note: Legacy parameter, will be ignored
|
|
4022
3972
|
*
|
|
4023
|
-
*
|
|
3973
|
+
* Deprecated legacy training parameter.
|
|
4024
3974
|
*/
|
|
4025
3975
|
scaleLr?: boolean;
|
|
4026
3976
|
|
|
4027
3977
|
/**
|
|
4028
3978
|
* Used to reproduce previous results. Default: randomly generated number.
|
|
4029
3979
|
*
|
|
4030
|
-
*
|
|
3980
|
+
* Deprecated legacy training parameter.
|
|
4031
3981
|
*/
|
|
4032
3982
|
seed?: number;
|
|
4033
3983
|
|
|
@@ -4039,21 +3989,21 @@ export namespace TrainTriggerParams {
|
|
|
4039
3989
|
*
|
|
4040
3990
|
* Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
4041
3991
|
*
|
|
4042
|
-
*
|
|
3992
|
+
* Deprecated legacy training parameter.
|
|
4043
3993
|
*/
|
|
4044
3994
|
textEncoderTrainingRatio?: number;
|
|
4045
3995
|
|
|
4046
3996
|
/**
|
|
4047
3997
|
* Validation frequency. Cannot be greater than maxTrainSteps value
|
|
4048
3998
|
*
|
|
4049
|
-
*
|
|
3999
|
+
* Deprecated legacy training parameter.
|
|
4050
4000
|
*/
|
|
4051
4001
|
validationFrequency?: number;
|
|
4052
4002
|
|
|
4053
4003
|
/**
|
|
4054
4004
|
* Validation prompt
|
|
4055
4005
|
*
|
|
4056
|
-
*
|
|
4006
|
+
* Deprecated legacy training parameter.
|
|
4057
4007
|
*/
|
|
4058
4008
|
validationPrompt?: string;
|
|
4059
4009
|
|