From 4bca29eb31573eaca8ef64581e1966c5a0cd6539 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sat, 10 Feb 2024 13:43:39 -0500 Subject: [PATCH] Updated ControlNet Web API (markdown) --- ControlNet-Web-API.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ControlNet-Web-API.md b/ControlNet-Web-API.md index 625a58b..599eb15 100644 --- a/ControlNet-Web-API.md +++ b/ControlNet-Web-API.md @@ -1,8 +1,6 @@ This page is a guide on how to use ControlNet's Web API. -You need to pass parameters to ControlNet script, when you use [A1111's txt2img/img2img generation API](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API). - -## List all available preprocessors example +## List all available preprocessors ```python modules = requests.get("http://localhost:7860/controlnet/module_list").json()["module_list"] """ @@ -20,7 +18,7 @@ modules = requests.get("http://localhost:7860/controlnet/module_list").json()["m """ ``` -## List all available models example +## List all available models ```python modules = requests.get("http://localhost:7860/controlnet/model_list").json()["model_list"] """ @@ -35,7 +33,11 @@ modules = requests.get("http://localhost:7860/controlnet/model_list").json()["mo """ ``` -## Generation (txt2img) example +## Generation (txt2img) +You need to pass parameters to ControlNet script, when you use [A1111's txt2img/img2img generation API](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API). + +You may find https://github.com/huchenlei/sd-webui-api-payload-display helpful to reproduce the an UI result via API. + ```python import base64 import cv2