sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Bug]: T2I with multi-controlnet canny and HED throws `AttributeError: 'NoneType' object has no attribute 'split'`

Open oliverban opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

Tried to render in t2i with controlnet set to Canny and HED, which worked fine with one. But then I added a second one with Guess Mode and got this: Traceback (most recent call last): File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data processed_input.append(block.preprocess(inputs[i])) File "C:\Users\olive\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 361, in svgPreprocess return input_image.orgpreprocess(inputs) File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess mask_im = processing_utils.decode_base64_to_image(mask) File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image content = encoding.split(";")[1] AttributeError: 'NoneType' object has no attribute 'split'

Steps to reproduce the problem

  1. Go to t2i
  2. write some words like sword, helmet
  3. Select Canny for cn1 and HED for cn2 and then have Guess Mode on for cn1
  4. Hit generate

What should have happened?

A render should have gone through and started showing me a render

Commit where the problem happens

webui: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 controlnet: latest as of today (2023-03-02 21:55)

What browsers do you use to access the UI ?

No response

Command Line Arguments

--xformers --no-half-vae --no-half --deepdanbooru --autolaunch

Console logs

Loading model: difference_controlSd15Canny [ea6e3b9c]
Loaded state_dict from [C:\Users\XXXXXX\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\models\difference_controlSd15Canny.safetensors]
Offset cloned: 298 values
ControlNet model difference_controlSd15Canny [ea6e3b9c] loaded.
Loading preprocessor: canny
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:09<00:00,  3.27it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 30/30 [00:08<00:00,  3.60it/s]
Loading preprocessor: canny
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:08<00:00,  3.56it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 30/30 [00:08<00:00,  3.58it/s]
Traceback (most recent call last):
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\olive\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 361, in svgPreprocess
    return input_image.orgpreprocess(inputs)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess
    mask_im = processing_utils.decode_base64_to_image(mask)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image
    content = encoding.split(";")[1]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\olive\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 361, in svgPreprocess
    return input_image.orgpreprocess(inputs)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess
    mask_im = processing_utils.decode_base64_to_image(mask)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image
    content = encoding.split(";")[1]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\olive\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 361, in svgPreprocess
    return input_image.orgpreprocess(inputs)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess
    mask_im = processing_utils.decode_base64_to_image(mask)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image
    content = encoding.split(";")[1]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 911, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\olive\Documents\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 361, in svgPreprocess
    return input_image.orgpreprocess(inputs)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 1508, in preprocess
    mask_im = processing_utils.decode_base64_to_image(mask)
  File "C:\Users\olive\Documents\stable-diffusion-webui\venv\lib\site-packages\gradio\processing_utils.py", line 53, in decode_base64_to_image
    content = encoding.split(";")[1]
AttributeError: 'NoneType' object has no attribute 'split'

Additional information

No response

oliverban avatar Mar 02 '23 20:03 oliverban

I am actually experiencing this exact same problem.

JuanuMusic avatar Mar 03 '23 21:03 JuanuMusic

I am facing the same problem but with only Canny model.

ImranBug avatar Mar 14 '23 10:03 ImranBug