Mikubill / sd-webui-controlnet

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

[Bug]: API changed?? API no longer working in latest control net version #2950

Closed pristinaai closed 3 weeks ago

pristinaai commented 3 weeks ago

Is there an existing issue for this?

What happened?

Hello, I'm unable to diagnose an issue I'm having with controlnet. I had a piece of code what was working fine a few weeks ago. I've updated control net and now its not? I was getting depreciation warnings, so I've changed the payload to 'image' and still not working. I've tested the webui and control net works fine here but not when using api? please help

Steps to reproduce the problem

my payload code: payload = { "init_images": [encoded_image], "prompt": prompt, "negative_prompt": negative_prompt, "seed": seed, "steps": steps, "denoising_strength": denoising_strength, "sampler_name": "Euler a", "cfg_scale": 2, "width": adjusted_resolution, "height": adjusted_resolution, "restore_faces": restore_faces, "mask": encoded_mask, "mask_blur_x": 0, "mask_blur_y": 0, "mask_blur": 0, "resize_mode": 0, "inpainting_fill": 1, "inpaint_full_res": True, "inpaint_full_res_padding": 20, "inpainting_mask_invert": 0, "alwayson_scripts": { "soft inpainting": { "args": [ { "Soft inpainting": True, "Schedule bias": 1, "Preservation strength": 0.5, "Transition contrast boost": 4, "Mask influence": 0, "Difference threshold": 0.5, "Difference contrast": 2, }, ] }, "ControlNet": { "args": [ { "image": encoded_norm, "model": "NormalmapbaeControlnet_v10 [55f9c98b]", "guidance_start": 0, "guidance_end": 0.7, "weight":geometry_strength,#0.5,#0.3, }, { "image": encoded_depth, "model": "diffusers_xl_depth_full [c4d5ca3b]", "guidance_start": 0, "guidance_end": 0.4, "weight": geometry_strength,#0.5, }, ] } } }

What should have happened?

I'm expecting in the log to pull control net like this: image

Commit where the problem happens

when using API

What browsers do you use to access the UI ?

No response

Command Line Arguments

--api

List of enabled extensions

image

Console logs

Instead of seeing control net. I get nothing

Additional information

No response

huchenlei commented 3 weeks ago

You need to set enabled : True in ControlNetUnit

pristinaai commented 3 weeks ago

Amazing thanks! image Working