Stable Diffusion
  1. 企业计划
Stable Diffusion
  • Stable Diffusion API 文档
  • A1111 调度程序
  • Stable Diffusion API
    • 概述
    • 文本到图像
      POST
    • 图像到图像
      POST
    • 修复
      POST
    • 获取排队图像
      POST
    • 系统负载
      POST
  • 训练模型
    • 概述
    • Lora 模型
    • Dreambooth 模型 (V2)
    • Dreambooth 模型
    • 训练状态
    • 获取模型列表
    • 删除训练
    • 取消训练
    • 裁剪 Base64 图像
  • 文字转视频
    • 概述
    • 创建视频
    • 将文本训练为视频
  • 社区模型 API V4
    • 概述
    • 文本转图像
    • LoRA
    • LoRA 多功能设备
    • 图像到图像
    • 修复
    • 获取排队图像接口
    • 重新加载模型接口
  • 管理信息系统
    • 概述
    • 裁剪 Base64 图像
    • 删除图像
    • 获取训练过的模型列表
    • 获取公共型号列表
    • 清除用户缓存
    • 购买 Dreambooth 模型
    • 购买订阅计划
    • 取消订阅计划
    • NSFW 图像检查
    • 上传模型
    • 创建房间内部接口
  • 控制网
    • 概述
    • ControlNet 主要终端
    • ControlNet 多功能终端
  • 企业计划
    • 概述
    • 系统详情
      POST
    • 重新启动服务器终端
      POST
    • 更新服务器
      POST
    • 更新 S3 详细信息
      POST
    • 清楚缓存
      POST
    • 列表调度程序
      POST
    • 负载模型
      POST
    • 验证模型
      POST
    • 获取所有模型
      POST
    • 删除模型
      POST
    • Controlnet
      POST
    • 文字转图像
      POST
    • 文字转视频
      POST
    • 图像到图像
      POST
    • 修复
      POST
    • 超分辨率
      POST
    • 上传图片
      POST
    • 同步模型
      POST
    • 负载 Vae
      POST
    • NSFW 图像检查
      POST
    • 获取排队图像
      POST
  • Dreambooth 沙盒
    • 概述
    • 创建 Dreambooth 请求(沙盒)
    • 获取训练状态(沙盒)
  • 图像编辑
    • 概述
    • 外部绘画
    • Blip 扩散
    • 魔术混合接口
    • 图像深度
    • 图像混合器
    • 图像引导编辑
    • 删除背景
    • 超分辨率
    • 混合画布
  • 文本转 3D
    • 概述
    • 文本转 3D
    • 图像转 3D
  • 未经审查的聊天
    POST
  1. 企业计划

负载模型

开发环境
https://stablediffusionapi.com/v1
开发环境
https://stablediffusionapi.com/v1
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_ip2pip2p
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' \
--header 'Content-Type: application/json' \
--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
key
string 
必需
您的企业API Key用于请求授权。
url
string 
必需
Huggingface模型的 URL 、.ckpt下载链接或来自我们的 Dreambooth API 的训练模型。
model_id
string 
必需
为您的模型选择一个名称(ID)。加载的模型将保存在此ID下,以便您在生成图像时参考它。
model_type
string 
必需
可用选项:“huggingface”、“api_trained”、“custom_ckpt”、“lora”、“embeddings”、“controlnet”。
from_safetensors
string 
必需
如果您正在加载.safetensor文件,请将其设置为“yes” ;否则通过“否”。
webhook
string 
必需
用于接收模型加载事件响应的 Webhook。
revision
string 
必需
指定加载的模型是“fp16”还是“fp32”。
upcast_attention
string 
必需
仅当您加载稳定扩散 2.1模型时才将其设置为“yes” ;否则保持“否”。
示例

返回响应

🟢200成功
application/json
Body
message
string 
必需
status
string 
必需
上一页
列表调度程序
下一页
验证模型
Built with