mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-28 18:53:58 +00:00
Updated ControlNet Web API (markdown)
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user