lllyasviel / lllyasviel/stable-diffusion-webui-forge

Can't inpaint using Controlnet anymore.

Open
#2,649 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Everytime I try using the inpaint tab in controlnet I get this error:

2025-02-12 21:59:06,694 - ControlNet - INFO - Current ControlNet ControlNetPatcher: I:\Stable Diffusion Forge\webui\models\ControlNet\control_v11p_sd15_inpaint.pth
*** Error running process_before_every_sampling: I:\Stable Diffusion Forge\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "I:\Stable Diffusion Forge\webui\modules\scripts.py", line 892, in process_before_every_sampling
script.process_before_every_sampling(p, *script_args, **kwargs)
File "I:\Stable Diffusion Forge\system\python\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "I:\Stable Diffusion Forge\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py", line 561, in process_before_every_sampling
self.process_unit_before_every_sampling(p, unit, self.current_params[i], *args, **kwargs)
File "I:\Stable Diffusion Forge\system\python\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "I:\Stable Diffusion Forge\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py", line 503, in process_unit_before_every_sampling
cond, mask = params.preprocessor.process_before_every_sampling(p, cond, mask, *args, **kwargs)
File "I:\Stable Diffusion Forge\webui\extensions-builtin\forge_preprocessor_inpaint\scripts\preprocessor_inpaint.py", line 27, in process_before_every_sampling
mask = mask.round()
AttributeError: 'NoneType' object has no attribute 'round'

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

Reproduce the failure from the ControlNet inpaint tab, then inspect extensions-builtin/sd_forge_controlnet/scripts/controlnet.py and extensions-builtin/forge_preprocessor_inpaint/scripts/preprocessor_inpaint.py around the reported calls. Trace why mask is None before preprocessor_inpaint.py:27 and verify the inpaint workflow completes without the AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.