创建风格训练
开发环境
开发环境
POST
/v3/training/style
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v3/training/style' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "test_style_1208",
"base_model": "v1-5-pruned-emaonly",
"width": 512,
"height": 512,
"image_dataset_items": [
{
"assets_id": 26,
"caption": "xstyle"
}
],
"expert_setting": {
"train_batch_size": 2,
"learning_rate": 0.0001,
"max_train_steps": 1,
"seed": 2023,
"lr_scheduler": "constant",
"lr_warmup_steps": null,
"instance_prompt": "Xstyle, of a young woman, profile shot, from side,sitting, looking at viewer, smiling, head tilt, eyes open,long black hair, glowing skin,light smile,cinematic lighting,dark environment",
"with_prior_preservation": true,
"class_prompt": "person"
},
"components": [
{
"name": "face_crop_region",
"args": [
{
"name": "ratio",
"value": "1.0"
}
]
},
{
"name": "resize",
"args": [
{
"name": "width",
"value": "512"
},
{
"name": "height",
"value": "512"
}
]
},
{
"name": "face_restore",
"args": [
{
"name": "method",
"value": "gfpgan_1.4"
},
{
"name": "upscale",
"value": "1.0"
}
]
}
]
}'
响应示例响应示例
{
"task_id": "fe84ac1b-5a01-487c-a56d-2c6c93b61f49"
}
请求参数
Header 参数
Authorization
string
必需
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2024-02-06 06:37:46