Dreambooth 模型 (V2)
开发环境
开发环境
POST
https://stablediffusionapi.com/api/v3/fine_tune_v2
POST
向https://stablediffusionapi.com/api/v3/fine_tune_v2端点发出请求,并将所需参数作为请求正文传递。midjourney
训练portraitplus
。信息
从 这里获取base_model_id。
提示
您还可以阅读我们的**博客文章**以了解有关模型训练的更多信息。
学习率值
learning_rate_unet
这是和参数的所有可能值的完整列表learning_rate_text_encoder
。["1e-5", "1e-6", "1e-7", "1e-8", "1e-9", "1e-10", "2e-0", "2e-1", "2e-2", "2e-3", "2e-4", "2e-5", "2e-6", "2e-7", "2e-8", "2e-9", "2e-10", "3e-0", "3e-1", "3e-2", "3e-3", "3e-4", "3e-5", "3e-6", "3e-7", "3e-8", "3e-9", "3e-10", "4e-0", "4e-1", "4e-2", "4e-3", "4e-4", "4e-5", "4e-6", "4e-7", "4e-8", "4e-9", "4e-10", "5e-0", "5e-1", "5e-2", "5e-3", "5e-4", "5e-5", "5e-6", "5e-7", "5e-8", "5e-9", "5e-10", "6e-0", "6e-1", "6e-2", "6e-3", "6e-4", "6e-5", "6e-6", "6e-7", "6e-8", "6e-9", "6e-10"]
训练类型
training_type
参数的所有可能值。价值 | 描述 |
---|---|
men | 在男人脸上训练 |
female | 在女性脸部进行训练 |
couple | 对男女情侣进行训练;在图像数组中传递情侣图像,而不是单个人的图像 |
null | 在物体或任何东西上训练 |
Webhook 发布JSON
{
"status": "success",
"training_status": "deploying_gpu",
"logs": "it will take upto 25 minutes",
"model_id": "F5jvdzGnYi",
}
培训状态值
地位 | 描述 |
---|---|
deploying_gpu | 部署GPU |
training_started | 培训开始 |
training_success | 培训顺利完成 |
trained_model_compressing | 压缩训练好的模型 |
trained_model_uploading | 上传训练好的模型 |
trained_model_uploaded | 训练好的模型已上传 |
deploying_model | 部署经过训练的模型 |
model_ready | 训练好的模型可供使用 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v3/fine_tune_v2?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"key": "",
"instance_prompt": "photo of adhik person",
"class_prompt": "photo of person",
"base_model_id": "portraitplus-diffusion",
"images": [
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00001.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00002.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00003.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00004.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00005.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00006.png",
"https://stablediffusionapi.com/storage/avatars/AdhikJoshi_00007.png"
],
"seed": "0",
"training_type": "men",
"learning_rate_unet": "2e-6",
"steps_unet": "1500",
"learning_rate_text_encoder": "1e-6",
"steps_text_encoder": "350",
"webhook": ""
}'
响应示例响应示例
{
"status": "string",
"messege": "string",
"data": "string",
"training_id": "string"
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-30 03:48:24