lllyasviel / lllyasviel/stable-diffusion-webui-forge

[Bug]: *** Error running process_before_every_sampling:

Open
#660 5 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

Checklist
  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet
What happened?

Facing issue with ControlNet in forge with SDXL models. For now tried segmentation. IP adaptors as well as instant ID in both img2img and text2img

Can anyone please help to help me with steps to resolve?

image

Steps to reproduce the problem
  1. select any controlnet and click generate
What should have happened?

generation should have happened without issue.

What browsers do you use to access the UI ?

Microsoft Edge, Other

Sysinfo

.

Console logs
---
To load target model AutoencoderKL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  2778.92431640625
[Memory Management] Model Memory (MB) =  319.11416244506836
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  1435.8101539611816
Moving model(s) has taken 0.09 seconds
*** Error running process_before_every_sampling: C:\Forge\stable-diffusion-webui-forge\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py
    Traceback (most recent call last):
      File "C:\Forge\stable-diffusion-webui-forge\modules\scripts.py", line 835, in process_before_every_sampling
        script.process_before_every_sampling(p, *script_args, **kwargs)
      File "C:\Forge\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "C:\Forge\stable-diffusion-webui-forge\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py", line 555, in process_before_every_sampling
        self.process_unit_before_every_sampling(p, unit, self.current_params[i], *args, **kwargs)
    KeyError: 0
Additional information

No response

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 in extensions-builtin/sd_forge_controlnet/scripts/controlnet.py at process_before_every_sampling and process_unit_before_every_sampling, then trace the call from modules/scripts.py line 835. Reproduce a ControlNet generation with an SDXL model and inspect why the current parameters produce KeyError: 0. Done means generation completes without this error.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.