ControlNet 主要终端
开发环境
开发环境
POST
https://stablediffusionapi.com/api/v5/controlnet
提示 您还可以使用此端点通过 ControlNet 修复图像。只需确保将链接传递到 mask_image
请求正文中,并使用controlnet_model
带有“inpaint”值的参数即可。
信息 在深入了解之前,请阅读我们有关 ControlNet 优势的详细**博客文章。**
POST
向 https://stablediffusionapi.com/api/v5/controlnet 接口发送请求。提示 您也可以使用多个 ControlNet 模型。只需在请求体中,将逗号分隔的控制网模型作为 "canny,depth"
传递给 controlnet_model,并将 init_image 传入即可。
模型
调度程序
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v5/controlnet' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "",
"controlnet_model": "canny",
"controlnet_type" :"canny",
"model_id": "midjourney",
"auto_hint": "yes",
"guess_mode" : "no",
"prompt": "a model doing photoshoot, ultra high resolution, 4K image",
"negative_prompt": null,
"init_image": "https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_human_openpose.png",
"mask_image": null,
"width": "512",
"height": "512",
"samples": "1",
"scheduler": "UniPCMultistepScheduler",
"num_inference_steps": "30",
"safety_checker": "no",
"enhance_prompt": "yes",
"guidance_scale": 7.5,
"controlnet_conditioning_scale": 0.5,
"strength": 0.55,
"lora_model": "more_details",
"clip_skip": "2",
"tomesd": "yes",
"use_karras_sigmas": "yes",
"vae": null,
"lora_strength": null,
"embeddings_model": null,
"seed": null,
"webhook": null,
"track_id": null
}'
响应示例响应示例
{
"status": "string",
"tip": "string",
"eta": 0,
"messege": "string",
"fetch_result": "string",
"id": 0,
"output": "string",
"meta": {
"prompt": "string",
"model_id": "string",
"controlnet_model": "string",
"controlnet_type": "string",
"negative_prompt": "string",
"scheduler": "string",
"safetychecker": "string",
"auto_hint": "string",
"guess_mode": "string",
"strength": 0,
"W": 0,
"H": 0,
"guidance_scale": 0,
"seed": 0,
"multi_lingual": "string",
"init_image": "string",
"mask_image": null,
"steps": 0,
"full_url": "string",
"upscale": "string",
"n_samples": 0,
"embeddings": null,
"lora": null,
"outdir": "string",
"file_prefix": "string"
}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-30 06:49:14