@civitai/client 0.1.9-beta.24 → 0.1.9-beta.26

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.
@@ -1,5 +1,6 @@
1
1
  type ClientConfig = {
2
2
  env?: 'dev' | 'prod';
3
+ baseUrl?: string;
3
4
  base?: string;
4
5
  auth: string;
5
6
  };
@@ -1,9 +1,10 @@
1
1
  import { createClient } from '@hey-api/client-fetch';
2
2
  export function createCivitaiClient(config) {
3
3
  const client = createClient({
4
- baseUrl: config.env === 'dev'
5
- ? 'https://orchestration-dev.civitai.com'
6
- : 'https://orchestration.civitai.com',
4
+ baseUrl: config.baseUrl ? config.baseUrl :
5
+ config.env === 'dev'
6
+ ? 'https://orchestration-dev.civitai.com'
7
+ : 'https://orchestration.civitai.com',
7
8
  global: false,
8
9
  headers: {
9
10
  Authorization: `Bearer ${config.auth}`,
@@ -1216,6 +1216,7 @@ export declare const $ImageResourceTrainingInput: {
1216
1216
  readonly mapping: {
1217
1217
  readonly kohya: '#/components/schemas/KohyaImageResourceTrainingInput';
1218
1218
  readonly 'flux-dev-fast': '#/components/schemas/FluxDevFastImageResourceTrainingInput';
1219
+ readonly musubi: '#/components/schemas/MusubiImageResourceTrainingInput';
1219
1220
  };
1220
1221
  };
1221
1222
  };
@@ -1525,6 +1526,7 @@ export declare const $Job: {
1525
1526
  readonly textToImage: '#/components/schemas/TextToImageJob';
1526
1527
  readonly textToImageV2: '#/components/schemas/TextToImageV2Job';
1527
1528
  readonly imageResourceTraining: '#/components/schemas/ImageResourceTrainingJob';
1529
+ readonly wdTagging: '#/components/schemas/WDTaggingJob';
1528
1530
  readonly comfy: '#/components/schemas/ComfyJob';
1529
1531
  readonly similaritySearch: '#/components/schemas/SimilaritySearchJob';
1530
1532
  readonly llmPromptAugmentation: '#/components/schemas/LLMPromptAugmentationJob';
@@ -1805,7 +1807,7 @@ export declare const $KohyaImageResourceTrainingInput: {
1805
1807
  readonly maximum: 3;
1806
1808
  readonly minimum: 0;
1807
1809
  readonly type: 'integer';
1808
- readonly description: 'If your training images have tags, you can randomly shuffle them. \nHowever, if you have words that you want to keep at the beginning, you can use this option to specify "Keep the first 0 words at the beginning".\nThis option does nothing if the Shuffle Tags option is off.';
1810
+ readonly description: 'If your training images have tags, you can randomly shuffle them.\nHowever, if you have words that you want to keep at the beginning, you can use this option to specify "Keep the first 0 words at the beginning".\nThis option does nothing if the Shuffle Tags option is off.';
1809
1811
  readonly format: 'int32';
1810
1812
  readonly default: 0;
1811
1813
  };
@@ -1855,7 +1857,7 @@ export declare const $KohyaImageResourceTrainingInput: {
1855
1857
  readonly maximum: 20;
1856
1858
  readonly minimum: 0;
1857
1859
  readonly type: 'integer';
1858
- readonly description: 'Learning is performed by putting noise of various strengths on the training image, \nbut depending on the difference in strength of the noise on which it is placed, learning will be\nstable by moving closer to or farther from the learning target.\n\nMin SNR gamma was introduced to compensate for that. When learning images have little noise,\nit may deviate greatly from the target, so try to suppress this jump.';
1860
+ readonly description: 'Learning is performed by putting noise of various strengths on the training image,\nbut depending on the difference in strength of the noise on which it is placed, learning will be\nstable by moving closer to or farther from the learning target.\n \nMin SNR gamma was introduced to compensate for that. When learning images have little noise,\nit may deviate greatly from the target, so try to suppress this jump.';
1859
1861
  readonly format: 'int32';
1860
1862
  readonly nullable: true;
1861
1863
  };
@@ -1871,7 +1873,7 @@ export declare const $KohyaImageResourceTrainingInput: {
1871
1873
  readonly maximum: 256;
1872
1874
  readonly minimum: 1;
1873
1875
  readonly type: 'integer';
1874
- readonly description: 'The smaller the Network alpha value, the larger the stored LoRA neural net weights. \nFor example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5, \nmeaning that the learning rate is only half as powerful as the Learning Rate setting.\n\nIf Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.';
1876
+ readonly description: 'The smaller the Network alpha value, the larger the stored LoRA neural net weights.\nFor example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,\nmeaning that the learning rate is only half as powerful as the Learning Rate setting.\n \nIf Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.';
1875
1877
  readonly format: 'int32';
1876
1878
  readonly nullable: true;
1877
1879
  };
@@ -1885,7 +1887,7 @@ export declare const $KohyaImageResourceTrainingInput: {
1885
1887
  };
1886
1888
  readonly optimizerType: {
1887
1889
  readonly type: 'string';
1888
- readonly description: 'The optimizer determines how to update the neural net weights during training. \nVarious methods have been proposed for smart learning, but the most commonly used in LoRA learning \nis "AdamW8bit" or "Adafactor" for SDXL.';
1890
+ readonly description: 'The optimizer determines how to update the neural net weights during training.\nVarious methods have been proposed for smart learning, but the most commonly used in LoRA learning\nis "AdamW8bit" or "Adafactor" for SDXL.';
1889
1891
  readonly nullable: true;
1890
1892
  };
1891
1893
  readonly targetSteps: {
@@ -2137,6 +2139,112 @@ export declare const $MochiVideoGenJob: {
2137
2139
  };
2138
2140
  };
2139
2141
  };
2142
+ export declare const $MusubiImageResourceTrainingInput: {
2143
+ readonly required: readonly ['engine'];
2144
+ readonly allOf: readonly [
2145
+ {
2146
+ readonly $ref: '#/components/schemas/ImageResourceTrainingInput';
2147
+ },
2148
+ {
2149
+ readonly type: 'object';
2150
+ readonly properties: {
2151
+ readonly maxTrainEpochs: {
2152
+ readonly maximum: 20;
2153
+ readonly minimum: 0;
2154
+ readonly type: 'integer';
2155
+ readonly description: 'An epoch is one set of learning. By default, we will save a maximum of 20 epochs (evenly distributed), and they are all available for download.';
2156
+ readonly format: 'int32';
2157
+ readonly default: 5;
2158
+ };
2159
+ readonly numRepeats: {
2160
+ readonly maximum: 5000;
2161
+ readonly minimum: 1;
2162
+ readonly type: 'integer';
2163
+ readonly description: 'Num Repeats defines how many times each individual image gets put into VRAM. As opposed to batch size, which is how many images are placed into VRAM at once.';
2164
+ readonly format: 'int32';
2165
+ readonly default: 8;
2166
+ };
2167
+ readonly trainBatchSize: {
2168
+ readonly maximum: 9;
2169
+ readonly minimum: 1;
2170
+ readonly type: 'integer';
2171
+ readonly description: 'Batch size is the number of images that will be placed into VRAM at once. A batch size of 2 will train two images at a time, simultaneously.';
2172
+ readonly format: 'int32';
2173
+ readonly nullable: true;
2174
+ };
2175
+ readonly resolution: {
2176
+ readonly maximum: 1024;
2177
+ readonly minimum: 512;
2178
+ readonly type: 'integer';
2179
+ readonly description: 'Specify the maximum resolution of training images. If the training images exceed the resolution specified here, they will be scaled down to this resolution';
2180
+ readonly format: 'int32';
2181
+ readonly nullable: true;
2182
+ };
2183
+ readonly enableBucket: {
2184
+ readonly type: 'boolean';
2185
+ readonly description: 'Sorts images into buckets by size for the purposes of training. If your training images are all the same size, you can turn this option off, but leaving it on has no effect.';
2186
+ readonly default: true;
2187
+ };
2188
+ readonly unetLR: {
2189
+ readonly maximum: 1;
2190
+ readonly minimum: 0;
2191
+ readonly type: 'number';
2192
+ readonly description: 'Sets the learning rate for U-Net. This is the learning rate when performing additional learning on each attention block (and other blocks depending on the setting) in U-Net';
2193
+ readonly format: 'double';
2194
+ readonly default: 0.00005;
2195
+ };
2196
+ readonly lrScheduler: {
2197
+ readonly enum: readonly ['constant', 'cosine', 'cosine_with_restarts', 'linear'];
2198
+ readonly type: 'string';
2199
+ readonly description: 'You can change the learning rate in the middle of learning. A scheduler is a setting for how to change the learning rate.';
2200
+ readonly nullable: true;
2201
+ };
2202
+ readonly lrSchedulerNumCycles: {
2203
+ readonly maximum: 4;
2204
+ readonly minimum: 1;
2205
+ readonly type: 'integer';
2206
+ readonly description: 'This option specifies how many cycles the scheduler runs during training. It is only used when "cosine_with_restarts" or "polynomial" is used as the scheduler.';
2207
+ readonly format: 'int32';
2208
+ readonly default: 3;
2209
+ };
2210
+ readonly networkDim: {
2211
+ readonly maximum: 256;
2212
+ readonly minimum: 1;
2213
+ readonly type: 'integer';
2214
+ readonly description: 'The larger the Dim setting, the more learning information can be stored, but the possibility of learning unnecessary information other than the learning target increases. A larger Dim also increases LoRA file size.';
2215
+ readonly format: 'int32';
2216
+ readonly nullable: true;
2217
+ };
2218
+ readonly networkAlpha: {
2219
+ readonly maximum: 256;
2220
+ readonly minimum: 1;
2221
+ readonly type: 'integer';
2222
+ readonly description: 'The smaller the Network alpha value, the larger the stored LoRA neural net weights.\nFor example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,\nmeaning that the learning rate is only half as powerful as the Learning Rate setting.\n \nIf Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.';
2223
+ readonly format: 'int32';
2224
+ readonly nullable: true;
2225
+ };
2226
+ readonly optimizerType: {
2227
+ readonly type: 'string';
2228
+ readonly description: 'The optimizer determines how to update the neural net weights during training.\nVarious methods have been proposed for smart learning, but the most commonly used in LoRA learning\nis "AdamW8bit" or "Adafactor" for SDXL.';
2229
+ readonly nullable: true;
2230
+ };
2231
+ readonly targetSteps: {
2232
+ readonly type: 'integer';
2233
+ readonly format: 'int32';
2234
+ readonly nullable: true;
2235
+ readonly readOnly: true;
2236
+ };
2237
+ };
2238
+ readonly additionalProperties: false;
2239
+ },
2240
+ ];
2241
+ readonly properties: {
2242
+ readonly engine: {
2243
+ readonly enum: readonly ['musubi'];
2244
+ readonly type: 'string';
2245
+ };
2246
+ };
2247
+ };
2140
2248
  export declare const $NSFWLevel: {
2141
2249
  readonly enum: readonly ['pg', 'pG13', 'r', 'x', 'xxx', 'na'];
2142
2250
  readonly type: 'string';
@@ -3341,6 +3449,55 @@ export declare const $ViduVideoGenStyle: {
3341
3449
  readonly enum: readonly ['general', 'anime'];
3342
3450
  readonly type: 'string';
3343
3451
  };
3452
+ export declare const $WDTaggingJob: {
3453
+ readonly required: readonly ['$type'];
3454
+ readonly allOf: readonly [
3455
+ {
3456
+ readonly $ref: '#/components/schemas/Job';
3457
+ },
3458
+ {
3459
+ readonly type: 'object';
3460
+ readonly properties: {
3461
+ readonly model: {
3462
+ readonly type: 'string';
3463
+ };
3464
+ readonly mediaUrl: {
3465
+ readonly type: 'string';
3466
+ readonly format: 'uri';
3467
+ };
3468
+ readonly threshold: {
3469
+ readonly type: 'number';
3470
+ readonly format: 'double';
3471
+ readonly nullable: true;
3472
+ };
3473
+ readonly movieRatingModel: {
3474
+ readonly type: 'string';
3475
+ readonly nullable: true;
3476
+ };
3477
+ readonly prompt: {
3478
+ readonly type: 'string';
3479
+ readonly nullable: true;
3480
+ };
3481
+ readonly claimDuration: {
3482
+ readonly type: 'string';
3483
+ readonly format: 'date-span';
3484
+ readonly readOnly: true;
3485
+ };
3486
+ readonly type: {
3487
+ readonly type: 'string';
3488
+ readonly readOnly: true;
3489
+ };
3490
+ };
3491
+ readonly additionalProperties: false;
3492
+ },
3493
+ ];
3494
+ readonly properties: {
3495
+ readonly $type: {
3496
+ readonly enum: readonly ['wdTagging'];
3497
+ readonly type: 'string';
3498
+ };
3499
+ };
3500
+ };
3344
3501
  export declare const $WorkerCapabilities: {
3345
3502
  readonly type: 'object';
3346
3503
  readonly properties: {
@@ -3796,6 +3953,12 @@ export declare const $WorkerRegistration: {
3796
3953
  readonly description: 'Get additional metadata about this worker. This can be used for debugging purposes as well as to target certain configurations to certain workers.';
3797
3954
  readonly nullable: true;
3798
3955
  };
3956
+ readonly capacitySaturationRate: {
3957
+ readonly type: 'number';
3958
+ readonly description: 'The saturation rate of available capacity of this worker of the worker.';
3959
+ readonly format: 'double';
3960
+ readonly nullable: true;
3961
+ };
3799
3962
  };
3800
3963
  readonly additionalProperties: false;
3801
3964
  readonly description: "Details of a worker's registration.";
@@ -4115,6 +4278,12 @@ export declare const $WorkflowStep: {
4115
4278
  readonly additionalProperties: {};
4116
4279
  readonly description: 'A collection of user defined metadata for the workflow step.';
4117
4280
  };
4281
+ readonly estimatedProgressRate: {
4282
+ readonly type: 'number';
4283
+ readonly description: 'An estimation on the current progression of this step, or null if there is no estimation';
4284
+ readonly format: 'double';
4285
+ readonly nullable: true;
4286
+ };
4118
4287
  };
4119
4288
  readonly additionalProperties: false;
4120
4289
  readonly description: 'Details of a workflow step.';
@@ -4185,6 +4354,12 @@ export declare const $WorkflowStepJob: {
4185
4354
  readonly description: "The job's cost.";
4186
4355
  readonly format: 'double';
4187
4356
  };
4357
+ readonly estimatedProgressRate: {
4358
+ readonly type: 'number';
4359
+ readonly description: 'An estimation on the current progression of this job, or null if there is no estimation';
4360
+ readonly format: 'double';
4361
+ readonly nullable: true;
4362
+ };
4188
4363
  };
4189
4364
  readonly additionalProperties: false;
4190
4365
  readonly description: 'Details of a job produced by a workflow step.';
@@ -1204,6 +1204,7 @@ export const $ImageResourceTrainingInput = {
1204
1204
  mapping: {
1205
1205
  kohya: '#/components/schemas/KohyaImageResourceTrainingInput',
1206
1206
  'flux-dev-fast': '#/components/schemas/FluxDevFastImageResourceTrainingInput',
1207
+ musubi: '#/components/schemas/MusubiImageResourceTrainingInput',
1207
1208
  },
1208
1209
  },
1209
1210
  };
@@ -1515,6 +1516,7 @@ export const $Job = {
1515
1516
  textToImage: '#/components/schemas/TextToImageJob',
1516
1517
  textToImageV2: '#/components/schemas/TextToImageV2Job',
1517
1518
  imageResourceTraining: '#/components/schemas/ImageResourceTrainingJob',
1519
+ wdTagging: '#/components/schemas/WDTaggingJob',
1518
1520
  comfy: '#/components/schemas/ComfyJob',
1519
1521
  similaritySearch: '#/components/schemas/SimilaritySearchJob',
1520
1522
  llmPromptAugmentation: '#/components/schemas/LLMPromptAugmentationJob',
@@ -1795,7 +1797,7 @@ export const $KohyaImageResourceTrainingInput = {
1795
1797
  maximum: 3,
1796
1798
  minimum: 0,
1797
1799
  type: 'integer',
1798
- description: `If your training images have tags, you can randomly shuffle them.
1800
+ description: `If your training images have tags, you can randomly shuffle them.
1799
1801
  However, if you have words that you want to keep at the beginning, you can use this option to specify "Keep the first 0 words at the beginning".
1800
1802
  This option does nothing if the Shuffle Tags option is off.`,
1801
1803
  format: 'int32',
@@ -1847,10 +1849,10 @@ This option does nothing if the Shuffle Tags option is off.`,
1847
1849
  maximum: 20,
1848
1850
  minimum: 0,
1849
1851
  type: 'integer',
1850
- description: `Learning is performed by putting noise of various strengths on the training image,
1852
+ description: `Learning is performed by putting noise of various strengths on the training image,
1851
1853
  but depending on the difference in strength of the noise on which it is placed, learning will be
1852
1854
  stable by moving closer to or farther from the learning target.
1853
-
1855
+
1854
1856
  Min SNR gamma was introduced to compensate for that. When learning images have little noise,
1855
1857
  it may deviate greatly from the target, so try to suppress this jump.`,
1856
1858
  format: 'int32',
@@ -1868,10 +1870,10 @@ it may deviate greatly from the target, so try to suppress this jump.`,
1868
1870
  maximum: 256,
1869
1871
  minimum: 1,
1870
1872
  type: 'integer',
1871
- description: `The smaller the Network alpha value, the larger the stored LoRA neural net weights.
1872
- For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,
1873
+ description: `The smaller the Network alpha value, the larger the stored LoRA neural net weights.
1874
+ For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,
1873
1875
  meaning that the learning rate is only half as powerful as the Learning Rate setting.
1874
-
1876
+
1875
1877
  If Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.`,
1876
1878
  format: 'int32',
1877
1879
  nullable: true,
@@ -1886,8 +1888,8 @@ If Alpha and Dim are the same number, the strength used will be 1 and will have
1886
1888
  },
1887
1889
  optimizerType: {
1888
1890
  type: 'string',
1889
- description: `The optimizer determines how to update the neural net weights during training.
1890
- Various methods have been proposed for smart learning, but the most commonly used in LoRA learning
1891
+ description: `The optimizer determines how to update the neural net weights during training.
1892
+ Various methods have been proposed for smart learning, but the most commonly used in LoRA learning
1891
1893
  is "AdamW8bit" or "Adafactor" for SDXL.`,
1892
1894
  nullable: true,
1893
1895
  },
@@ -2140,6 +2142,118 @@ export const $MochiVideoGenJob = {
2140
2142
  },
2141
2143
  },
2142
2144
  };
2145
+ export const $MusubiImageResourceTrainingInput = {
2146
+ required: ['engine'],
2147
+ allOf: [
2148
+ {
2149
+ $ref: '#/components/schemas/ImageResourceTrainingInput',
2150
+ },
2151
+ {
2152
+ type: 'object',
2153
+ properties: {
2154
+ maxTrainEpochs: {
2155
+ maximum: 20,
2156
+ minimum: 0,
2157
+ type: 'integer',
2158
+ description: 'An epoch is one set of learning. By default, we will save a maximum of 20 epochs (evenly distributed), and they are all available for download.',
2159
+ format: 'int32',
2160
+ default: 5,
2161
+ },
2162
+ numRepeats: {
2163
+ maximum: 5000,
2164
+ minimum: 1,
2165
+ type: 'integer',
2166
+ description: 'Num Repeats defines how many times each individual image gets put into VRAM. As opposed to batch size, which is how many images are placed into VRAM at once.',
2167
+ format: 'int32',
2168
+ default: 8,
2169
+ },
2170
+ trainBatchSize: {
2171
+ maximum: 9,
2172
+ minimum: 1,
2173
+ type: 'integer',
2174
+ description: 'Batch size is the number of images that will be placed into VRAM at once. A batch size of 2 will train two images at a time, simultaneously.',
2175
+ format: 'int32',
2176
+ nullable: true,
2177
+ },
2178
+ resolution: {
2179
+ maximum: 1024,
2180
+ minimum: 512,
2181
+ type: 'integer',
2182
+ description: 'Specify the maximum resolution of training images. If the training images exceed the resolution specified here, they will be scaled down to this resolution',
2183
+ format: 'int32',
2184
+ nullable: true,
2185
+ },
2186
+ enableBucket: {
2187
+ type: 'boolean',
2188
+ description: 'Sorts images into buckets by size for the purposes of training. If your training images are all the same size, you can turn this option off, but leaving it on has no effect.',
2189
+ default: true,
2190
+ },
2191
+ unetLR: {
2192
+ maximum: 1,
2193
+ minimum: 0,
2194
+ type: 'number',
2195
+ description: 'Sets the learning rate for U-Net. This is the learning rate when performing additional learning on each attention block (and other blocks depending on the setting) in U-Net',
2196
+ format: 'double',
2197
+ default: 0.00005,
2198
+ },
2199
+ lrScheduler: {
2200
+ enum: ['constant', 'cosine', 'cosine_with_restarts', 'linear'],
2201
+ type: 'string',
2202
+ description: 'You can change the learning rate in the middle of learning. A scheduler is a setting for how to change the learning rate.',
2203
+ nullable: true,
2204
+ },
2205
+ lrSchedulerNumCycles: {
2206
+ maximum: 4,
2207
+ minimum: 1,
2208
+ type: 'integer',
2209
+ description: 'This option specifies how many cycles the scheduler runs during training. It is only used when "cosine_with_restarts" or "polynomial" is used as the scheduler.',
2210
+ format: 'int32',
2211
+ default: 3,
2212
+ },
2213
+ networkDim: {
2214
+ maximum: 256,
2215
+ minimum: 1,
2216
+ type: 'integer',
2217
+ description: 'The larger the Dim setting, the more learning information can be stored, but the possibility of learning unnecessary information other than the learning target increases. A larger Dim also increases LoRA file size.',
2218
+ format: 'int32',
2219
+ nullable: true,
2220
+ },
2221
+ networkAlpha: {
2222
+ maximum: 256,
2223
+ minimum: 1,
2224
+ type: 'integer',
2225
+ description: `The smaller the Network alpha value, the larger the stored LoRA neural net weights.
2226
+ For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,
2227
+ meaning that the learning rate is only half as powerful as the Learning Rate setting.
2228
+
2229
+ If Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.`,
2230
+ format: 'int32',
2231
+ nullable: true,
2232
+ },
2233
+ optimizerType: {
2234
+ type: 'string',
2235
+ description: `The optimizer determines how to update the neural net weights during training.
2236
+ Various methods have been proposed for smart learning, but the most commonly used in LoRA learning
2237
+ is "AdamW8bit" or "Adafactor" for SDXL.`,
2238
+ nullable: true,
2239
+ },
2240
+ targetSteps: {
2241
+ type: 'integer',
2242
+ format: 'int32',
2243
+ nullable: true,
2244
+ readOnly: true,
2245
+ },
2246
+ },
2247
+ additionalProperties: false,
2248
+ },
2249
+ ],
2250
+ properties: {
2251
+ engine: {
2252
+ enum: ['musubi'],
2253
+ type: 'string',
2254
+ },
2255
+ },
2256
+ };
2143
2257
  export const $NSFWLevel = {
2144
2258
  enum: ['pg', 'pG13', 'r', 'x', 'xxx', 'na'],
2145
2259
  type: 'string',
@@ -3345,6 +3459,55 @@ export const $ViduVideoGenStyle = {
3345
3459
  enum: ['general', 'anime'],
3346
3460
  type: 'string',
3347
3461
  };
3462
+ export const $WDTaggingJob = {
3463
+ required: ['$type'],
3464
+ allOf: [
3465
+ {
3466
+ $ref: '#/components/schemas/Job',
3467
+ },
3468
+ {
3469
+ type: 'object',
3470
+ properties: {
3471
+ model: {
3472
+ type: 'string',
3473
+ },
3474
+ mediaUrl: {
3475
+ type: 'string',
3476
+ format: 'uri',
3477
+ },
3478
+ threshold: {
3479
+ type: 'number',
3480
+ format: 'double',
3481
+ nullable: true,
3482
+ },
3483
+ movieRatingModel: {
3484
+ type: 'string',
3485
+ nullable: true,
3486
+ },
3487
+ prompt: {
3488
+ type: 'string',
3489
+ nullable: true,
3490
+ },
3491
+ claimDuration: {
3492
+ type: 'string',
3493
+ format: 'date-span',
3494
+ readOnly: true,
3495
+ },
3496
+ type: {
3497
+ type: 'string',
3498
+ readOnly: true,
3499
+ },
3500
+ },
3501
+ additionalProperties: false,
3502
+ },
3503
+ ],
3504
+ properties: {
3505
+ $type: {
3506
+ enum: ['wdTagging'],
3507
+ type: 'string',
3508
+ },
3509
+ },
3510
+ };
3348
3511
  export const $WorkerCapabilities = {
3349
3512
  type: 'object',
3350
3513
  properties: {
@@ -3800,6 +3963,12 @@ export const $WorkerRegistration = {
3800
3963
  description: 'Get additional metadata about this worker. This can be used for debugging purposes as well as to target certain configurations to certain workers.',
3801
3964
  nullable: true,
3802
3965
  },
3966
+ capacitySaturationRate: {
3967
+ type: 'number',
3968
+ description: 'The saturation rate of available capacity of this worker of the worker.',
3969
+ format: 'double',
3970
+ nullable: true,
3971
+ },
3803
3972
  },
3804
3973
  additionalProperties: false,
3805
3974
  description: "Details of a worker's registration.",
@@ -4113,6 +4282,12 @@ export const $WorkflowStep = {
4113
4282
  additionalProperties: {},
4114
4283
  description: 'A collection of user defined metadata for the workflow step.',
4115
4284
  },
4285
+ estimatedProgressRate: {
4286
+ type: 'number',
4287
+ description: 'An estimation on the current progression of this step, or null if there is no estimation',
4288
+ format: 'double',
4289
+ nullable: true,
4290
+ },
4116
4291
  },
4117
4292
  additionalProperties: false,
4118
4293
  description: 'Details of a workflow step.',
@@ -4183,6 +4358,12 @@ export const $WorkflowStepJob = {
4183
4358
  description: "The job's cost.",
4184
4359
  format: 'double',
4185
4360
  },
4361
+ estimatedProgressRate: {
4362
+ type: 'number',
4363
+ description: 'An estimation on the current progression of this job, or null if there is no estimation',
4364
+ format: 'double',
4365
+ nullable: true,
4366
+ },
4186
4367
  },
4187
4368
  additionalProperties: false,
4188
4369
  description: 'Details of a job produced by a workflow step.',
@@ -22,6 +22,7 @@ import type {
22
22
  GetRecommendedResourcesResponse,
23
23
  DownloadResourceData,
24
24
  CreateWorkerData,
25
+ CreateWorkerError,
25
26
  QueryWorkersResponse,
26
27
  GetWorkerData,
27
28
  DeleteWorkerData,
@@ -203,7 +204,7 @@ export declare const createWorker: (
203
204
  options?: Options<CreateWorkerData>
204
205
  ) => import('@hey-api/client-fetch').RequestResult<
205
206
  import('./types.gen').CreateWorkerResult,
206
- import('./types.gen').ProblemDetails
207
+ CreateWorkerError
207
208
  >;
208
209
  /**
209
210
  * Query existing workers.
@@ -1108,6 +1108,65 @@ export type $type8 = 'mochi';
1108
1108
  export declare const $type8: {
1109
1109
  readonly MOCHI: 'mochi';
1110
1110
  };
1111
+ export type MusubiImageResourceTrainingInput = ImageResourceTrainingInput & {
1112
+ /**
1113
+ * An epoch is one set of learning. By default, we will save a maximum of 20 epochs (evenly distributed), and they are all available for download.
1114
+ */
1115
+ maxTrainEpochs?: number;
1116
+ /**
1117
+ * Num Repeats defines how many times each individual image gets put into VRAM. As opposed to batch size, which is how many images are placed into VRAM at once.
1118
+ */
1119
+ numRepeats?: number;
1120
+ /**
1121
+ * Batch size is the number of images that will be placed into VRAM at once. A batch size of 2 will train two images at a time, simultaneously.
1122
+ */
1123
+ trainBatchSize?: number | null;
1124
+ /**
1125
+ * Specify the maximum resolution of training images. If the training images exceed the resolution specified here, they will be scaled down to this resolution
1126
+ */
1127
+ resolution?: number | null;
1128
+ /**
1129
+ * Sorts images into buckets by size for the purposes of training. If your training images are all the same size, you can turn this option off, but leaving it on has no effect.
1130
+ */
1131
+ enableBucket?: boolean;
1132
+ /**
1133
+ * Sets the learning rate for U-Net. This is the learning rate when performing additional learning on each attention block (and other blocks depending on the setting) in U-Net
1134
+ */
1135
+ unetLR?: number;
1136
+ /**
1137
+ * You can change the learning rate in the middle of learning. A scheduler is a setting for how to change the learning rate.
1138
+ */
1139
+ lrScheduler?: 'constant' | 'cosine' | 'cosine_with_restarts' | 'linear' | null;
1140
+ /**
1141
+ * This option specifies how many cycles the scheduler runs during training. It is only used when "cosine_with_restarts" or "polynomial" is used as the scheduler.
1142
+ */
1143
+ lrSchedulerNumCycles?: number;
1144
+ /**
1145
+ * The larger the Dim setting, the more learning information can be stored, but the possibility of learning unnecessary information other than the learning target increases. A larger Dim also increases LoRA file size.
1146
+ */
1147
+ networkDim?: number | null;
1148
+ /**
1149
+ * The smaller the Network alpha value, the larger the stored LoRA neural net weights.
1150
+ * For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5,
1151
+ * meaning that the learning rate is only half as powerful as the Learning Rate setting.
1152
+ *
1153
+ * If Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.
1154
+ */
1155
+ networkAlpha?: number | null;
1156
+ /**
1157
+ * The optimizer determines how to update the neural net weights during training.
1158
+ * Various methods have been proposed for smart learning, but the most commonly used in LoRA learning
1159
+ * is "AdamW8bit" or "Adafactor" for SDXL.
1160
+ */
1161
+ optimizerType?: string | null;
1162
+ readonly targetSteps?: number | null;
1163
+ } & {
1164
+ engine: 'musubi';
1165
+ };
1166
+ export type engine9 = 'musubi';
1167
+ export declare const engine9: {
1168
+ readonly MUSUBI: 'musubi';
1169
+ };
1111
1170
  export type NSFWLevel = 'pg' | 'pG13' | 'r' | 'x' | 'xxx' | 'na';
1112
1171
  export declare const NSFWLevel: {
1113
1172
  readonly PG: 'pg';
@@ -1783,8 +1842,8 @@ export declare const duration2: {
1783
1842
  readonly _4: 4;
1784
1843
  readonly _8: 8;
1785
1844
  };
1786
- export type engine9 = 'vidu';
1787
- export declare const engine9: {
1845
+ export type engine10 = 'vidu';
1846
+ export declare const engine10: {
1788
1847
  readonly VIDU: 'vidu';
1789
1848
  };
1790
1849
  export type ViduVideoGenJob = Job & {
@@ -1810,6 +1869,21 @@ export declare const ViduVideoGenStyle: {
1810
1869
  readonly GENERAL: 'general';
1811
1870
  readonly ANIME: 'anime';
1812
1871
  };
1872
+ export type WDTaggingJob = Job & {
1873
+ model?: string;
1874
+ mediaUrl?: string;
1875
+ threshold?: number | null;
1876
+ movieRatingModel?: string | null;
1877
+ prompt?: string | null;
1878
+ readonly claimDuration?: string;
1879
+ readonly type?: string;
1880
+ } & {
1881
+ $type: 'wdTagging';
1882
+ };
1883
+ export type $type16 = 'wdTagging';
1884
+ export declare const $type16: {
1885
+ readonly WD_TAGGING: 'wdTagging';
1886
+ };
1813
1887
  /**
1814
1888
  * Details of a worker's capabilities.
1815
1889
  */
@@ -2123,6 +2197,10 @@ export type WorkerRegistration = {
2123
2197
  metadata?: {
2124
2198
  [key: string]: unknown;
2125
2199
  } | null;
2200
+ /**
2201
+ * The saturation rate of available capacity of this worker of the worker.
2202
+ */
2203
+ capacitySaturationRate?: number | null;
2126
2204
  };
2127
2205
  /**
2128
2206
  * Options for representing the status for a resource on a worker.
@@ -2379,6 +2457,10 @@ export type WorkflowStep = {
2379
2457
  metadata?: {
2380
2458
  [key: string]: unknown;
2381
2459
  };
2460
+ /**
2461
+ * An estimation on the current progression of this step, or null if there is no estimation
2462
+ */
2463
+ estimatedProgressRate?: number | null;
2382
2464
  };
2383
2465
  /**
2384
2466
  * Details of a workflow step event.
@@ -2417,6 +2499,10 @@ export type WorkflowStepJob = {
2417
2499
  * The job's cost.
2418
2500
  */
2419
2501
  cost?: number;
2502
+ /**
2503
+ * An estimation on the current progression of this job, or null if there is no estimation
2504
+ */
2505
+ estimatedProgressRate?: number | null;
2420
2506
  };
2421
2507
  /**
2422
2508
  * Details of a workflow step job event.
@@ -2693,7 +2779,7 @@ export type CreateWorkerData = {
2693
2779
  body?: WorkerRegistration;
2694
2780
  };
2695
2781
  export type CreateWorkerResponse = CreateWorkerResult;
2696
- export type CreateWorkerError = ProblemDetails;
2782
+ export type CreateWorkerError = ProblemDetails & string;
2697
2783
  export type QueryWorkersResponse = Array<WorkerDetails>;
2698
2784
  export type QueryWorkersError = ProblemDetails;
2699
2785
  export type GetWorkerData = {
@@ -3366,6 +3452,10 @@ export type $OpenApiTs = {
3366
3452
  * Forbidden
3367
3453
  */
3368
3454
  '403': ProblemDetails;
3455
+ /**
3456
+ * Not Acceptable
3457
+ */
3458
+ '406': string;
3369
3459
  };
3370
3460
  };
3371
3461
  get: {
@@ -187,6 +187,9 @@ export const engine8 = {
187
187
  export const $type8 = {
188
188
  MOCHI: 'mochi',
189
189
  };
190
+ export const engine9 = {
191
+ MUSUBI: 'musubi',
192
+ };
190
193
  export const NSFWLevel = {
191
194
  PG: 'pg',
192
195
  P_G13: 'pG13',
@@ -272,7 +275,7 @@ export const duration2 = {
272
275
  _4: 4,
273
276
  _8: 8,
274
277
  };
275
- export const engine9 = {
278
+ export const engine10 = {
276
279
  VIDU: 'vidu',
277
280
  };
278
281
  export const $type15 = {
@@ -282,6 +285,9 @@ export const ViduVideoGenStyle = {
282
285
  GENERAL: 'general',
283
286
  ANIME: 'anime',
284
287
  };
288
+ export const $type16 = {
289
+ WD_TAGGING: 'wdTagging',
290
+ };
285
291
  /**
286
292
  * Options for representing the status for a resource on a worker.
287
293
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/client",
3
- "version": "0.1.9-beta.24",
3
+ "version": "0.1.9-beta.26",
4
4
  "description": "Civitai's javascript client for generating ai content",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",