lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.28k stars 807 forks source link

Flux's controlnet is not working #1127

Open qw381523977 opened 2 months ago

qw381523977 commented 2 months ago

I downloaded the model of flux's controlnet from this address (https://huggingface.co/XLabs-AI/flux-controlnet-collections/tree/main),When I use it in the forge UI, the background prompts me 2024-08-15 13:40:35,555 - ControlNet - ERROR - Recognizing Control Model failed: E:\SD\sdwebui\extensions\sd-webui-controlnet\models\flux-canny-controlnet_v2.safetensors Error running process: D:\webui_forge_cu124_torch24\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py Traceback (most recent call last): File "D:\webui_forge_cu124_torch24\webui\modules\scripts.py", line 844, in process script.process(p, script_args) File "D:\webui_forge_cu124_torch24\system\python\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context return func(*args, *kwargs) File "D:\webui_forge_cu124_torch24\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py", line 554, in process self.process_unit_after_click_generate(p, unit, params, args, kwargs) File "D:\webui_forge_cu124_torch24\system\python\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "D:\webui_forge_cu124_torch24\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py", line 414, in process_unit_after_click_generate assert params.model is not None, logger.error(f"Recognizing Control Model failed: {model_filename}") AssertionError: None

*** Error running process_before_every_sampling: D:\webui_forge_cu124_torch24\webui\extensions-builtin\sd_forge_controlnet\scripts\controlnet.py
Traceback (most recent call last):
  File "D:\webui_forge_cu124_torch24\webui\modules\scripts.py", line 892, in process_before_every_sampling
    script.process_before_every_sampling(p, *script_args, **kwargs)
  File "D:\webui_forge_cu124_torch24\system\python\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "D:\webui_forge_cu124_torch24\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)
KeyError: 0

Hope to fix it soon
cattycnir commented 2 months ago

+1

qw381523977 commented 2 months ago

@lllyasviel

mikheys commented 2 months ago

+1

LIQUIDMIND111 commented 2 months ago

ME TOO

xerexesx commented 2 months ago

Yes me too

john-sp commented 2 months ago

I managed to fix it by downgrading onnx to 1.16.1

Command to fix it (must have venv active when running command) pip install onnx==1.16.1

See the onnx issue for more info

qw381523977 commented 2 months ago

I managed to fix it by downgrading onnx to 1.16.1

Command to fix it (must have venv active when running command) pip install onnx==1.16.1

See the onnx issue for more info

I tried this but it didn't work for me

mx109 commented 2 months ago

also tired onnx downgrade also didn't work

LIQUIDMIND111 commented 2 months ago

any updates on another post?

qw381523977 commented 2 months ago

any updates on another post?

Which post?

LIQUIDMIND111 commented 2 months ago

any updates on another post?

Which post?

https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1253#issuecomment-2299697487

qw381523977 commented 2 months ago

any updates on another post?

Which post?

#1253 (comment)

As the same, there is no way to use controlnet in this article

HurroWorld commented 2 months ago

+1

mx109 commented 2 months ago

So as there is no solution for forge and I'm not skilled enough to make any, I've tried compfyui and both loras and control nets work well with Flux.1. Hadn't tried it before because building workflows seemed a bit overkill for me but after a few hours I must say it's pretty easy to use if you know stable diffusion and gives you a lot of flexibility. Sorry for OT.

rtracing commented 2 months ago

+1

fabfabsto commented 2 months ago

+1

WillyamBradberry commented 1 month ago

Does nor work.

mertayd0 commented 1 month ago

I am having the same issue, any updates?