- CV任务状态码信息附录
- 绘图信息
- 绘图任务
- 模型训练
- 绘图工具
- 图片检测
- 视频工具
- 音频工具
- 翻译
提交训练任务
POST
/AIGCImgOpenServ/saas/modelTraining/submitTraining/Job
img
请求参数
Header 参数
X-Request-req-accessKeyId
string
可选
X-Request-req-accessKeySecret
string
可选
Body 参数application/json
taskId
string
必需
fileUrlList
array[string]
必需
maxEpochs
integer
可选
batchSize
integer
可选
learningRate
string
可选
maxTokenLength
integer
可选
clipSkip
integer
1-5 默认1
randomCrop
boolean
可选
pretrainedModel
string
可选
repeats
integer
可选
mixedPrecision
string
可选
savePrecision
string
可选
numCpuThreadsPerProcess
integer
1-20
seed
integer
可选
cacheLatents
boolean
可选
cacheLatentsToDisk
boolean
可选
lrScheduler
string
可选
lrWarmupSteps
integer
0-100
optimizerType
string
可选
resolution
integer
可选
enableBucket
boolean
可选
minBucketReso
integer
可选
maxBucketReso
integer
可选
textEncoderLr
string
可选
unetLr
string
可选
networkDropout
number
0-1
rankDropout
number
0-1
moduleDropout
number
0-1
networkModule
string
可选
networkDim
integer
可选
networkAlpha
integer
可选
networkArgs
string
可选
v2
boolean
可选
flipAug
boolean
可选
colorAug
boolean
可选
gradientAccumulationSteps
integer
可选
noiseOffset
number
0-1
示例
{
"file_url_list": [],
"max_epochs": 20,
"batch_size": 2,
"learning_rate": "0.0001",
"max_token_length": 225,
"clip_skip": 2,
"random_crop": 0,
"repeats": 10,
"mixedPrecision": "bf16",
"savePrecision": "bf16",
"numCpuThreadsPerProcess": 4,
"seed": 1234,
"cacheLatents": true,
"cacheLatentsToDisk": false,
"lrScheduler": "constant",
"lrWarmupSteps": 0,
"optimizerType": "Lion",
"resolution": 384,
"enableBucket": true,
"minBucketReso": 256,
"maxBucketReso": 2048,
"textEncoderLr": "5e-05",
"unetLr": "0.0001",
"networkDropout": 0,
"rankDropout": 0,
"moduleDropout": 0,
"networkModule": "networks.lora",
"networkDim": 128,
"networkAlpha": 128,
"networkArgs": "",
"v2": false,
"flipAug": false,
"colorAug": false,
"noiseOffset": 0.05,
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/modelTraining/submitTraining/Job' \
--header 'X-Request-req-accessKeyId;' \
--header 'X-Request-req-accessKeySecret;' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_url_list": [],
"max_epochs": 20,
"batch_size": 2,
"learning_rate": "0.0001",
"max_token_length": 225,
"clip_skip": 2,
"random_crop": 0,
"repeats": 10,
"mixedPrecision": "bf16",
"savePrecision": "bf16",
"numCpuThreadsPerProcess": 4,
"seed": 1234,
"cacheLatents": true,
"cacheLatentsToDisk": false,
"lrScheduler": "constant",
"lrWarmupSteps": 0,
"optimizerType": "Lion",
"resolution": 384,
"enableBucket": true,
"minBucketReso": 256,
"maxBucketReso": 2048,
"textEncoderLr": "5e-05",
"unetLr": "0.0001",
"networkDropout": 0,
"rankDropout": 0,
"moduleDropout": 0,
"networkModule": "networks.lora",
"networkDim": 128,
"networkAlpha": 128,
"networkArgs": "",
"v2": false,
"flipAug": false,
"colorAug": false,
"noiseOffset": 0.05,
}'
返回响应
🟢200成功
application/json
Body
code
string
200 成功
msg
string
必需
示例
{
"code": "string",
"msg": "string"
}
修改于 2024-01-15 10:12:39