houseofsecrets / SdPaint

Stable Diffusion Painting
MIT License
1.62k stars 115 forks source link

Script ‘controlnet’ not #51

Open ihousse opened 1 year ago

ihousse commented 1 year ago
1 2

when I paint someting,I get ErrorCode return;HTTP 422. Then I curl the requestbody ,the error detail is Script ‘controlnet’ not.

requestbody(I just empty the value of input_image,it's too long): {"prompt": "a castle", "negative_prompt": "(worst quality,low quality,bad quality,normal quality:1.2)", "enable_hr": "false", "seed": 42, "batch_size": 1, "steps": 16, "quick_steps": 12, "cfg_scale": 7, "width": 512, "height": 512, "override_settings": {"CLIP_stop_at_last_layers": 1}, "override_settings_restore_afterwards": "true", "hr_second_pass_steps": 9, "hr_scale": 1.0, "hr_upscaler": "Latent (bicubic)", "denoising_strength": 0.6, "sampler_name": "DPM++ 2M Karras", "alwayson_scripts": {"controlnet": {"args": [{"weight": 0.6, "guidance_start": 0.0, "guidance_end": 1.0, "module": "invert", "pixel_perfect": false, "model": ["control_v11e_sd15_ip2p", "control_v11e_sd15_shuffle", "control_v11p_sd15_canny", "control_v11f1e_sd15_tile", "control_v11f1p_sd15_depth", "control_v11p_sd15_canny", "control_v11p_sd15_inpaint", "control_v11p_sd15_lineart", "control_v11p_sd15_mlsd", "control_v11p_sd15_normalbae", "control_v11p_sd15_openpose", "control_v11p_sd15_scribble"], "input_image": "", "processor_res": 512}]}}}

realadamsmith commented 1 year ago

I personally get HTTP 404 error, Im not sure yet how to troubleshoot but ill be using GPT4 to troubleshoot, give me a moment

realadamsmith commented 1 year ago

Is the API outdated? And is it making calls to this site's APIs? do we need an API key? Do we need their subscription? https://stablediffusionapi.com/

Danamir commented 1 year ago

Tested with the latest ControlNet v1.1.186, no problem on API side. Did you check the "Allow other script to control this extension" option in ControlNet settings ?

mawdesign commented 3 months ago

I had this too, but with 404 error and the response was "sampler not found". Using the keyboard shortcuts to change sampler, controlnet, and hires fixed this - the default (or saved) can be ones that are not available, cycling then uses ones pulled from the api. The "patch_api_1_9_x" function fails if the sampler has no spaces so I have commented that out for the moment.

Fixes:

  1. check current sampler, etc against api when loading defaults or saved settings,
  2. split sampler and scheduler in config rather than in cn_requests.py

Now my problem is that the progress bar moves but nothing comes appears when it gets to 100%.