lllyasviel / lllyasviel/ControlNet

detect_map = 255-detect_map TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Open
#244 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

When I use Multi ControlNet

Traceback (most recent call last):
File "/home/xucanjie/stable-diffusion-webui/modules/scripts.py", line 404, in postprocess
script.postprocess(p, processed, *script_args)
File "/home/xucanjie/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 850, in postprocess
detect_map = 255-detect_map
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

if choose other model

Traceback (most recent call last):
File "/home/xucanjie/stable-diffusion-webui/modules/scripts.py", line 404, in postprocess
script.postprocess(p, processed, *script_args)
File "/home/xucanjie/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 851, in postprocess
processed.images.extend([Image.fromarray(detect_map)])
File "/home/xucanjie/stable-diffusion-webui/venv/lib/python3.10/site-packages/PIL/Image.py", line 3069, in fromarray
arr = obj.__array_interface__
AttributeError: 'NoneType' object has no attribute '__array_interface__'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with extensions/sd-webui-controlnet/scripts/controlnet.py around lines 850-851 and reproduce the error using Multi ControlNet and another model. Trace why detect_map is None before the arithmetic and Image.fromarray calls; done means the reported workflows complete without either traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.