Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.83k stars 1.94k forks source link

[Bug]: api calls fail occasionally #1216

Closed lictex closed 10 months ago

lictex commented 1 year ago

Is there an existing issue for this?

What happened?

simultaneously calling /sdapi/v1/*2img and /controlnet/model_list sometimes fails RuntimeError: model not found: None

Steps to reproduce the problem

  1. write a simple loop requesting /controlnet/model_list (just for stress test)
  2. send any control net request to /sdapi/v1/*2img
example req ```json { "denoising_strength": 0.699999988079071, "prompt": "...", "seed": -1, "sampler_name": "DPM++ SDE", "batch_size": 1, "n_iter": 1, "steps": 28, "cfg_scale": 7.0, "width": 384, "height": 512, "negative_prompt": "...", "alwayson_scripts": { "controlnet": { "args": [ { "input_image": "...", "model": "control_sd15_canny [fef5e48e]", "module": "none", "weight": 2.0, "lowvram": false, "guidance_start": 0.0, "guidance_end": 0.12999999523162842 }, { "input_image": "...", "model": "control_v11p_sd15_seg [e1f51eb9]", "module": "none", "weight": 1.0, "lowvram": false, "guidance_start": 0.0, "guidance_end": 1.0 }, { "input_image": "...", "model": "control_v11p_sd15_openpose [cab727d4]", "module": "none", "weight": 1.0, "lowvram": false, "guidance_start": 0.0, "guidance_end": 1.0 } ] } } } ```

What should have happened?

they shouldnt fail ...or document this limitation somewhere. not a big deal really, but debugging this could be pretty annoying

Commit where the problem happens

webui: 76c19e22 controlnet: c9c8ca6e

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--api --listen --port 8000 --server-name :: --no-half-vae --opt-sdp-attention --opt-channelslast --enable-insecure-extension-access

Console logs

logs ```Shell ################################################################ Install script for stable-diffusion + Web UI Tested on Debian 11 (Bullseye) ################################################################ ################################################################ Running on lictex_ user ################################################################ ################################################################ Repo already cloned, using it as install directory ################################################################ ################################################################ Create and activate python venv ################################################################ ################################################################ Launching launch.py... ################################################################ ./webui.sh: 行 179: ldconfig: 未找到命令 Cannot locate TCMalloc (improves CPU memory usage) Python 3.10.10 (main, Mar 01 2023, 21:10:14) [GCC] Commit hash: 76c19e220c8b929551d82dd6196c10acd0792d39 Installing requirements Launching Web UI with arguments: --api --listen --port 8000 --server-name :: --no-half-vae --opt-sdp-attention --opt-channelslast --enable-insecure-extension-access No module 'xformers'. Proceeding without it. ControlNet v1.1.150 ControlNet v1.1.150 Loading weights [0873291ac5] from /home/lictex_/source/stable-diffusion-webui/models/Stable-diffusion/AbyssOrangeMix2_nsfw.safetensors Creating model from config: /home/lictex_/source/stable-diffusion-webui/configs/v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying scaled dot product cross attention optimization. Textual inversion embeddings loaded(0): Model loaded in 3.3s (load weights from disk: 0.5s, create model: 0.4s, apply weights to model: 0.8s, apply channels_last: 0.6s, apply half(): 0.5s, move model to device: 0.5s). Running on local URL: http://:::8000 To create a public link, set `share=True` in `launch()`. Startup time: 7.5s (import torch: 0.8s, import gradio: 0.9s, import ldm: 0.3s, other imports: 0.7s, load scripts: 0.5s, load SD checkpoint: 3.4s, create ui: 0.5s, gradio launch: 0.2s). ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] /* ...many same lines */ ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] Loading model: control_sd15_canny [fef5e48e] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] /* ...many same lines */ ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] Loaded state_dict from [/home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_sd15_canny.pth] Loading config: /home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_sd15_canny.yaml ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] /* ...many same lines */ ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] Error running process: /home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py Traceback (most recent call last): File "/home/lictex_/source/stable-diffusion-webui/modules/scripts.py", line 417, in process script.process(p, *script_args) File "/home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1017, in process model_net = self.load_control_model(p, unet, unit.model, unit.low_vram) File "/home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 689, in load_control_model model_net = self.build_control_model(p, unet, model, lowvram) File "/home/lictex_/source/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 703, in build_control_model raise RuntimeError(f"model not found: {model}") RuntimeError: model not found: None ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] /* ...many same lines */ ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ControlNet model control_sd15_canny [fef5e48e] loaded. ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] Loading preprocessor: none preprocessor resolution = 512 ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] /* ...many same lines */ ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] ['control_sd15_canny [fef5e48e]', 'control_sd15_openpose [fef5e48e]', 'control_sd15_scribble [fef5e48e]', 'control_sd15_seg [fef5e48e]', 'control_v11p_sd15_openpose [cab727d4]', 'control_v11p_sd15_seg [e1f51eb9]'] 0%| | 0/28 [00:00

Additional information

update=True makes the model list refresh every api call (...why?) https://github.com/Mikubill/sd-webui-controlnet/blob/c9c8ca6eee86e0fa4dec9f5e62a5f34e38ae1707/scripts/api.py#L35 ...but mutating global states here arent thread safe i guess, so other requests at the same time might read incomplete data from cn_models https://github.com/Mikubill/sd-webui-controlnet/blob/c9c8ca6eee86e0fa4dec9f5e62a5f34e38ae1707/scripts/global_state.py#L157-L158

huchenlei commented 1 year ago

Nice catch!

This is definitely problematic as sharing global states in python global variable is not thread-safe while exposed in a concurrent API.

We need to guard the critial region with threading.Lock.

lllyasviel commented 1 year ago

nope. usually this kind of problem should let users to manage locks themselves so that they wont worry about duplicated locks degrade their performance

lictex commented 1 year ago

yes tweaking script logic carefully could avoid this issue for me

:thinking: considering if someone is serving sd as a public http api service then client side locks would be impossible. not sure if this is a valid use case though


reducing operations on global states could be another not so perfect solution: ```diff diff --git a/scripts/global_state.py b/scripts/global_state.py index e318e9b..c9d61e3 100644 --- a/scripts/global_state.py +++ b/scripts/global_state.py @@ -155,27 +155,26 @@ def get_all_models(sort_by, filter_by, path): def update_cn_models(): - cn_models.clear() ext_dirs = (shared.opts.data.get("control_net_models_path", None), getattr(shared.cmd_opts, 'controlnet_dir', None)) extra_lora_paths = (extra_lora_path for extra_lora_path in ext_dirs if extra_lora_path is not None and os.path.exists(extra_lora_path)) paths = [cn_models_dir, cn_models_dir_old, *extra_lora_paths] + new_cn_models = OrderedDict({"None": None}) for path in paths: sort_by = shared.opts.data.get( "control_net_models_sort_models_by", "name") filter_by = shared.opts.data.get("control_net_models_name_filter", "") found = get_all_models(sort_by, filter_by, path) - cn_models.update({**found, **cn_models}) + new_cn_models.update(found) - # insert "None" at the beginning of `cn_models` in-place - cn_models_copy = OrderedDict(cn_models) - cn_models.clear() - cn_models.update({**{"None": None}, **cn_models_copy}) - - cn_models_names.clear() - for name_and_hash, filename in cn_models.items(): + new_cn_models_names = {} + for name_and_hash, filename in new_cn_models.items(): if filename is None: continue name = os.path.splitext(os.path.basename(filename))[0].lower() - cn_models_names[name] = name_and_hash + new_cn_models_names[name] = name_and_hash + + global cn_models, cn_models_names + cn_models = new_cn_models + cn_models_names = new_cn_models_names ``` ...still NOT thread safe (think theres a little chance that `cn_models` and `cn_models_names` mismatch), but at least global dicts wont be incomplete so it should be much better than current one
lllyasviel commented 1 year ago

what is the reason we need cn_models.clear() in the first place? mikubill's magic again?

lictex commented 1 year ago

looks like its used to handle model deletion since dict.update wont remove any entries ah the clear seems also help properly sorting entries by name as a ordered dict use insertion order only

ghpkishore commented 1 year ago

@lictex can you help me understand how I can make API calls for multi controlnet and what exactly should I do for it to work?

Command Line Args: --api --listen --no-half-vae --opt-sdp-attention --opt-channelslast --enable-insecure-extension-access

Entire Request:

url = "http://127.0.0.1:7860"

imgInput = cv2.imread('/home/ec2-user/stable-diffusion-webui/apiTestImage.png')[:, :, ::-1]
retval, bytes = cv2.imencode('.png', imgInput)
encoded_image_input = base64.b64encode(bytes).decode('utf-8')

img = cv2.cvtColor(cv2.imread('/home/ec2-user/stable-diffusion-webui/apiTestImage.png')[:, :, ::-1], cv2.COLOR_RGB2BGR)
retval, bytes = cv2.imencode('.png', img)
encoded_image = base64.b64encode(bytes).decode('utf-8')
payload = {
    "denoising_strength": 0.9,
    "prompt": "Blue ribbons and blue flowers on a blue coloured table",
    "seed": -1,
    "sampler_name": "DPM++ SDE",
    "batch_size": 1,
    "n_iter": 1,
    "steps": 28,
    "cfg_scale": 7.0,
    "width": 384,
    "height": 512,
    "negative_prompt": "...",
    "alwayson_scripts": {
        "controlnet": {
            "args": [
                {
                    "input_image": [encoded_image_input],
                    "model": "control_v11p_sd15_canny [d14c016b]",
                    "module": "canny",
                    "weight": 1.0,
                    "lowvram": "false",
                    "guidance_start": 0.0,
                    "guidance_end": 1.0
                },
                {
                    "input_image": [encoded_image_input],
                    "model": "control_v11f1p_sd15_depth [cfd03158]",
                    "module": "depth_zoe",
                    "weight": 1.0,
                    "lowvram": "false",
                    "guidance_start": 0.0,
                    "guidance_end": 1.0
                }
            ]
        }

    }
}

My specific use case is that I want to perform inpainting with multi controlnet. I want to change the controlnet models, parameters, and the inputs to them. Request you to help me out in this, cause I really have no clue how to solve for this. Any example file or documentation would also work.

ghpkishore commented 1 year ago

@lictex I am consistently getting the following

Console Log

API error: POST: http://127.0.0.1:7860/sdapi/v1/img2img {'error': 'RuntimeError', 'detail': '', 'body': '', 'errors': "There is no current event loop in thread 'AnyIO worker thread'."}
Traceback (most recent call last):
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/streams/memory.py", line 94, in receive
    return self.receive_nowait()
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/streams/memory.py", line 89, in receive_nowait
    raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 78, in call_next
    message = await recv_stream.receive()
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/streams/memory.py", line 114, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ec2-user/stable-diffusion-webui/modules/api/api.py", line 145, in exception_handling
    return await call_next(request)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
  File "/home/ec2-user/stable-diffusion-webui/modules/api/api.py", line 110, in log_and_time
    res: Response = await call_next(req)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 84, in call_next
    raise app_exc
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/ec2-user/stable-diffusion-webui/modules/api/api.py", line 338, in img2imgapi
    self.default_script_arg_img2img = self.init_default_script_args(script_runner)
  File "/home/ec2-user/stable-diffusion-webui/modules/api/api.py", line 254, in init_default_script_args
    script_args[script.args_from:script.args_to] = ui_default_values
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/blocks.py", line 1160, in __exit__
    self.app = routes.App.create_app(self)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/routes.py", line 143, in create_app
    app = App(default_response_class=ORJSONResponse)
  File "/home/ec2-user/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/routes.py", line 113, in __init__
    self.lock = asyncio.Lock()
  File "/home/ec2-user/anaconda3/lib/python3.9/asyncio/locks.py", line 81, in __init__
    self._loop = events.get_event_loop()
  File "/home/ec2-user/anaconda3/lib/python3.9/asyncio/events.py", line 642, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'AnyIO worker thread'.
lictex commented 1 year ago

@ghpkishore seems a bit off-topic.. for the api calls i did nothing special really. put multiple entries into args, send the request, and it just works

did a quick search and it looks same as https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9046 which is fixed recently try updating the webui and see if it helps, if not it might be better to open a new issue then

ghpkishore commented 1 year ago

@lictex sure thanks will do so.

Regarding Multi controlnet:

Does this structure work for controlnet args? Is the schema correct?

"controlnet": {
            "args": [
                {
                    "input_image": "...",
                    "model": "control_sd15_canny [fef5e48e]",
                    "module": "none",
                    "weight": 2.0,
                    "lowvram": false,
                    "guidance_start": 0.0,
                    "guidance_end": 0.12999999523162842
                },
                {
                    "input_image": "...",
                    "model": "control_v11p_sd15_seg [e1f51eb9]",
                    "module": "none",
                    "weight": 1.0,
                    "lowvram": false,
                    "guidance_start": 0.0,
                    "guidance_end": 1.0
                },
                {
                    "input_image": "...",
                    "model": "control_v11p_sd15_openpose [cab727d4]",
                    "module": "none",
                    "weight": 1.0,
                    "lowvram": false,
                    "guidance_start": 0.0,
                    "guidance_end": 1.0
                }
            ]
}
lictex commented 1 year ago

think it should work. args are pretty well documented in the api wiki. make sure the Multi ControlNet: Max models amount in webui settings is large enough though

ghpkishore commented 1 year ago

think it should work. args are pretty well documented in the api wiki. make sure the Multi ControlNet: Max models amount in webui settings is large enough though

Thanks @lictex it is working for me.