负载模型
开发环境
开发环境
POST
https://stablediffusionapi.com/api/v1/enterprise/load_model
POST
向 https://stablediffusionapi.com/api/v1/enterprise/load_model 接口发送请求。笔记 选择用于加载的模型必须是扩散器模型。
ControlNet 模型 url 和 model_id表
网址 | 型号_id |
---|---|
lllyasviel/control_v11p_sd15_inpaint | 修复 |
lllyasviel/control_v11e_sd15_ip2p | ip2p |
lllyasviel/control_v11f1e_sd15_tile | 瓦 |
lllyasviel/control_v11e_sd15_shuffle | 随机播放 |
lllyasviel/control_v11p_sd15_softedge | 软边 |
lllyasviel/control_v11p_sd15_scribble | 涂 |
lllyasviel/control_v11p_sd15_lineart | 线条艺术 |
lllyasviel/control_v11p_sd15_normalbae | 正常情况 |
lllyasviel/control_v11f1p_sd15_深度 | 深度 |
lllyasviel/control_v11p_sd15_mlsd | 最小二乘法 |
lllyasviel/control_v11p_sd15_canny | 精明的 |
示例
Load a .ckpt or .safetensors Model from Civita
{
"key": "enterprise_api_key",
"url": "https://civitai.com/api/download/models/94640",
"model_id": "majicmix-realistic",
"model_type": "custom_ckpt",
"from_safetensors": "yes",
"webhook": "https://stablediffusionapi.com",
"revision": "fp32",
"upcast_attention": "no"
}
Load a .ckpt Model from Civitai
Load a Huggingface Model
{
"key": "enterprise_api_key",
"url": "wavymulder/Analog-Diffusion",
"model_id": "analog-diffusion",
"model_type": "huggingface",
"from_safetensors": "no",
"webhook": "https://stablediffusionapi.com",
"revision": "fp32",
"upcast_attention": "no"
}
Request: Load a Huggingface Model
Request Body: Load a ControlNet Model
{
"key": "enterprise_api_key",
"url": "lllyasviel/control_v11p_sd15_canny",
"model_id": "canny",
"model_type": "controlnet",
"webhook": "https://stablediffusionapi.com",
"revision": "fp32",
"upcast_attention": "no"
}
Request: Load a ControlNet Model
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v1/enterprise/load_model?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"key": "enterprise_api_key",
"url": "https://civitai.com/api/download/models/94640",
"model_id": "majicmix-realistic",
"model_type": "custom_ckpt",
"from_safetensors": "yes",
"webhook": "https://stablediffusionapi.com",
"revision": "fp32",
"upcast_attention": "no"
}'
响应示例响应示例
{
"message": "string",
"status": "string"
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-30 07:13:28