stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

Flux's controlnet is not working

Open qw381523977 opened this issue 1 year ago • 18 comments

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

qw381523977 avatar Aug 15 '24 05:08 qw381523977

+1

cattycnir avatar Aug 16 '24 05:08 cattycnir

@lllyasviel

qw381523977 avatar Aug 16 '24 07:08 qw381523977

+1

mikheys avatar Aug 16 '24 09:08 mikheys

ME TOO

LIQUIDMIND111 avatar Aug 18 '24 02:08 LIQUIDMIND111

Yes me too

xerexesx avatar Aug 18 '24 13:08 xerexesx

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

john-sp avatar Aug 18 '24 17:08 john-sp

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

qw381523977 avatar Aug 19 '24 04:08 qw381523977

also tired onnx downgrade also didn't work

mx109 avatar Aug 19 '24 19:08 mx109

any updates on another post?

LIQUIDMIND111 avatar Aug 20 '24 14:08 LIQUIDMIND111

any updates on another post?

Which post?

qw381523977 avatar Aug 20 '24 14:08 qw381523977

any updates on another post?

Which post?

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

LIQUIDMIND111 avatar Aug 20 '24 20:08 LIQUIDMIND111

any updates on another post?

Which post?

#1253 (comment)

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

qw381523977 avatar Aug 22 '24 01:08 qw381523977

+1

HurroWorld avatar Aug 22 '24 09:08 HurroWorld

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.

mx109 avatar Aug 22 '24 16:08 mx109

+1

rtracing avatar Aug 26 '24 16:08 rtracing

+1

fabfabsto avatar Aug 30 '24 20:08 fabfabsto

Does nor work.

WillyamBradberry avatar Sep 07 '24 11:09 WillyamBradberry

I am having the same issue, any updates?

mertayd0 avatar Sep 27 '24 09:09 mertayd0