Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
17.01k stars 1.96k forks source link

[Bug]: "Couldn't install sd-web-ui-controlnet requirement: mcv-full" #485

Closed dermesut closed 1 year ago

dermesut commented 1 year ago

Is there an existing issue for this?

What happened?

I just updated controlnet to the most recent 6dea4af0, coming from a version that 10 hours ago was still the most recent one. Nothing unusual could be seen in the webui, but I tend to do a restart of the server, after I update controlnet, so I did. And this is what cmd gave me:

(see Concole log section)

Obviously, I left out the most part of the "[1249 lines of output]" and out in "[...]".

Other than that occurance at the start of the server, I don't see any differene. Everything seems to work normally. Be it on the webui or in cinema4d (within which I usually use this, via API).

Steps to reproduce the problem

  1. Update to 6dea4af0
  2. Start server
  3. Get installation error
  4. Still enjoy everything working normally (?)

What should have happened?

I guees, it should have been able to install that requirement "mcv-full".

Commit where the problem happens

webui: 0cc0ee1b controlnet: 6dea4af0

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--medvram --allow-code --xformers --api --api-log --port 7860 --device-id 0

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI
Error running install.py for extension extensions\sd-webui-controlnet.
Command: "E:\ai\_gh_repos\sd.webui\system\python\python.exe" "extensions\sd-webui-controlnet\install.py"
Error code: 1
stdout: Installing sd-webui-controlnet requirement: mmcv-full

stderr: Traceback (most recent call last):
  File "E:\ai\_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\install.py", line 10, in <module>
    launch.run_pip(f"install {lib}", f"sd-webui-controlnet requirement: {lib}")
  File "E:\ai\_gh_repos\sd.webui\webui\launch.py", line 137, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "E:\ai\_gh_repos\sd.webui\webui\launch.py", line 105, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install sd-webui-controlnet requirement: mmcv-full.
Command: "E:\ai\_gh_repos\sd.webui\system\python\python.exe" -m pip install mmcv-full --prefer-binary
Error code: 1
stdout: Collecting mmcv-full
  Using cached mmcv-full-1.7.1.tar.gz (605 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: addict in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (2.4.0)
Requirement already satisfied: numpy in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (1.23.3)
Requirement already satisfied: packaging in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (23.0)
Requirement already satisfied: Pillow in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (9.4.0)
Requirement already satisfied: pyyaml in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (6.0)
Requirement already satisfied: yapf in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (0.32.0)
Requirement already satisfied: regex in e:\ai\_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full) (2022.10.31)
Building wheels for collected packages: mmcv-full
  Building wheel for mmcv-full (setup.py): started
  Building wheel for mmcv-full (setup.py): finished with status 'error'
  Running setup.py clean for mmcv-full
Failed to build mmcv-full
Installing collected packages: mmcv-full
  Running setup.py install for mmcv-full: started
  Running setup.py install for mmcv-full: finished with status 'error'

stderr:   error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.
  exit code: 1

  [1249 lines of output]
  running bdist_wheel
  E:\ai\_gh_repos\sd.webui\system\python\lib\site-packages\torch\utils\cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
    warnings.warn(msg.format('we could not find ninja.'))
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-310
  creating build\lib.win-amd64-cpython-310\mmcv
  copying mmcv\version.py -> build\lib.win-amd64-cpython-310\mmcv
  copying mmcv\__init__.py -> build\lib.win-amd64-cpython-310\mmcv
  creating build\lib.win-amd64-cpython-310\mmcv\arraymisc
  copying mmcv\arraymisc\quantization.py -> build\lib.win-amd64-cpython-310\mmcv\arraymisc
  copying mmcv\arraymisc\__init__.py -> build\lib.win-amd64-cpython-310\mmcv\arraymisc
  creating build\lib.win-amd64-cpython-310\mmcv\cnn

[...]

copying mmcv\ops\csrc\tensorrt\plugins\trt_scatternd_kernel.cu -> build\lib.win-amd64-cpython-310\mmcv\ops\csrc\tensorrt\plugins
  running build_ext
  E:\ai\_gh_repos\sd.webui\system\python\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] Das System kann die angegebene Datei nicht finden
    warnings.warn(f'Error checking compiler version for {compiler}: {error}')
  E:\ai\_gh_repos\sd.webui\system\python\lib\site-packages\torch\utils\cpp_extension.py:387: UserWarning: The detected CUDA version (11.3) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
  building 'mmcv._ext' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

mmcv-full

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Launching Web UI with arguments: --medvram --allow-code --xformers --api --api-log --port 7860 --device-id 0
Loading weights [fc52756a74] from E:\ai\_gh_repos\sd.webui\webui\models\Stable-diffusion\dreamlike-photoreal-2.0.ckpt
Creating model from config: E:\ai\_gh_repos\sd.webui\webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: E:\ai\_gh_repos\sd.webui\webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 2.8s (load weights from disk: 0.8s, create model: 0.4s, apply weights to model: 0.6s, apply half(): 0.8s, load VAE: 0.2s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

Additional information

No response

Ailitonia commented 1 year ago

same question on win11 I solved it by manually installing mmcv pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13/index.html refer to mmcv docs

dermesut commented 1 year ago

Good to know. Thank you. Since I seem to run on cude 11.3, for me selection the according dropdowns on that site lead to: pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12/index.html I guess, this should solve my problem.

But still: I believe, it would be nice, if one would not need to do that manually?

Ailitonia commented 1 year ago

May the latest 1.7.1 version of mmcv does not have pre-compiled package for windows, and maybe the maintainer didn't discover this when testing🤣

dermesut commented 1 year ago

I just saw another update, fixing this problem. By deleting the corresponding lines in the requirements.txt. Well, that definitely solves it for me :)

OedoSoldier commented 1 year ago

7. pip install mmdet

Yach can confirm this solves the stuck, thx

AyoKeito commented 1 year ago
  1. pip install mmdet

Yach can confirm this solves the stuck, thx

I've actually removed my message because controlnet is not working for me (never did, in fact). I'm not sure if that's from incorrect environment or installation so i've removed potentially not working solution and gave up on the extension.

dermesut commented 1 year ago

Just saw another update. Installed 06a48138. Back at having problems again:

Installing requirements for Web UI Error running install.py for extension extensions\sd-webui-controlnet. Command: "E:\ai_gh_repos\sd.webui\system\python\python.exe" "extensions\sd-webui-controlnet\install.py" Error code: 1 stdout: Installing sd-webui-controlnet requirement: openmim Installing sd-webui-controlnet requirement: mmcv-full Installing sd-webui-controlnet requirement: mmsegmentation

stderr: Traceback (most recent call last): File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\install.py", line 31, in run_mim(f"install {lib}", f"sd-webui-controlnet requirement: {lib}") File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\install.py", line 19, in run_mim return launch.run(f'"{launch.python}" -m mim {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}") File "E:\ai_gh_repos\sd.webui\webui\launch.py", line 105, in run raise RuntimeError(message) RuntimeError: Couldn't install sd-webui-controlnet requirement: mmsegmentation. Command: "E:\ai_gh_repos\sd.webui\system\python\python.exe" -m mim install mmsegmentation --prefer-binary Error code: 1 stdout: Looking in links: https://download.openmmlab.com/mmcv/dist/cu117/torch1.13.0/index.html Collecting mmsegmentation Downloading mmsegmentation-0.30.0-py3-none-any.whl (831 kB) -------------------------------------- 831.7/831.7 kB 7.5 MB/s eta 0:00:00 Collecting mmcls>=0.20.1 Downloading mmcls-0.25.0-py2.py3-none-any.whl (648 kB) ------------------------------------- 648.8/648.8 kB 10.1 MB/s eta 0:00:00 Collecting prettytable Downloading prettytable-3.6.0-py3-none-any.whl (27 kB) Requirement already satisfied: packaging in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmsegmentation) (23.0) Requirement already satisfied: numpy in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmsegmentation) (1.23.3) Requirement already satisfied: matplotlib in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmsegmentation) (3.6.3) Collecting mmcv-full<1.7.0,>=1.4.4 Downloading mmcv-full-1.6.2.tar.gz (575 kB) ------------------------------------- 575.1/575.1 kB 12.0 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: kiwisolver>=1.0.1 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (1.4.4) Requirement already satisfied: fonttools>=4.22.0 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (4.38.0) Requirement already satisfied: pyparsing>=2.2.1 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (2.8.2) Requirement already satisfied: pillow>=6.2.0 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (9.4.0) Requirement already satisfied: contourpy>=1.0.1 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (1.0.7) Requirement already satisfied: cycler>=0.10 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from matplotlib->mmsegmentation) (0.11.0) Requirement already satisfied: addict in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full<1.7.0,>=1.4.4->mmsegmentation) (2.4.0) Requirement already satisfied: pyyaml in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full<1.7.0,>=1.4.4->mmsegmentation) (6.0) Requirement already satisfied: yapf in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full<1.7.0,>=1.4.4->mmsegmentation) (0.32.0) Requirement already satisfied: regex in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from mmcv-full<1.7.0,>=1.4.4->mmsegmentation) (2022.10.31) Requirement already satisfied: wcwidth in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from prettytable->mmsegmentation) (0.2.6) Requirement already satisfied: six>=1.5 in e:\ai_gh_repos\sd.webui\system\python\lib\site-packages (from python-dateutil>=2.7->matplotlib->mmsegmentation) (1.16.0) Building wheels for collected packages: mmcv-full Building wheel for mmcv-full (setup.py): started Building wheel for mmcv-full (setup.py): finished with status 'error' Running setup.py clean for mmcv-full Failed to build mmcv-full Installing collected packages: prettytable, mmcv-full, mmcls, mmsegmentation Attempting uninstall: mmcv-full Found existing installation: mmcv-full 1.7.1 Uninstalling mmcv-full-1.7.1: Successfully uninstalled mmcv-full-1.7.1 Running setup.py install for mmcv-full: started Running setup.py install for mmcv-full: finished with status 'error' Rolling back uninstall of mmcv-full Moving to e:\ai_gh_repos\sd.webui\system\python\lib\site-packages\mmcv\ from E:\ai_gh_repos\sd.webui\system\python\Lib\site-packages\~mcv Moving to e:\ai_gh_repos\sd.webui\system\python\lib\site-packages\mmcv_full-1.7.1.dist-info\ from E:\ai_gh_repos\sd.webui\system\python\Lib\site-packages\~mcv_full-1.7.1.dist-info

stderr: error: subprocess-exited-with-error

python setup.py bdist_wheel did not run successfully. exit code: 1

[1187 lines of output]

...

running build_ext E:\ai_gh_repos\sd.webui\system\python\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] Das System kann die angegebene Datei nicht finden warnings.warn(f'Error checking compiler version for {compiler}: {error}') E:\ai_gh_repos\sd.webui\system\python\lib\site-packages\torch\utils\cpp_extension.py:387: UserWarning: The detected CUDA version (11.3) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'mmcv._ext' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

Encountered error while trying to install package.

mmcv-full

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

[notice] A new release of pip available: 22.3.1 -> 23.0.1 [notice] To update, run: python.exe -m pip install --upgrade pip

Launching Web UI with arguments: --medvram --allow-code --xformers --api --api-log --port 7860 --device-id 0 Loading weights [fc52756a74] from E:\ai_gh_repos\sd.webui\webui\models\Stable-diffusion\dreamlike-photoreal-2.0.ckpt Creating model from config: E:\ai_gh_repos\sd.webui\webui\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading VAE weights specified in settings: E:\ai_gh_repos\sd.webui\webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors Applying xformers cross attention optimization. Textual inversion embeddings loaded(0): Model loaded in 2.6s (load weights from disk: 0.7s, create model: 0.4s, apply weights to model: 0.6s, apply half(): 0.8s, load VAE: 0.2s). Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch().

neojam commented 1 year ago

same "Couldn't install sd-webui-controlnet requirement: mmsegmentation"

AyoKeito commented 1 year ago

Working installation method (for endless installation):

  1. Install sd-webui-controlnet, don't wait for it to finish, just make sure folder appears in extensions. Stop the webui.
  2. Activate VENV
  3. Uninstall all prerequisites if some were installed: pip uninstall mmsegmentation pip uninstall mmdet pip uninstall mmcv-full
  4. Install mmcv-full with: pip install psutil ninja pip install openmim mim install mmcv-full
  5. Install other prerequisites: pip install svglib pip install mmdet pip install mmsegmentation
  6. Restart automatic webui. It should start fine.

Verified working in clean automatic webui with latest controlnet. Windows 11. mmcv-full version installed is 1.7.1 For some reason pip is stuck building wheels endlessly when installing it.

dermesut commented 1 year ago

Updated to: 721fd78c. cmd now says: " Installing requirements for Web UI [ControlNet] Package mmsegmentation not found in current environment. Some annotators may not function properly. [ControlNet] Package mmdet not found in current environment. Some annotators may not function properly. " To be expected, as is the fact that segmantation preprocessor-module doesn't work anymore: " ControlNet model control_sd15_seg [fef5e48e] loaded. API 2023-03-04 14:23:10.281128 200 http/1.1 GET /sdapi/v1/progress 127.0.0.1 0.0 API 2023-03-04 14:23:10.402290 200 http/1.1 GET /sdapi/v1/progress 127.0.0.1 0.0 Loading preprocessor: segmentation API 2023-03-04 14:23:10.640022 200 http/1.1 GET /sdapi/v1/progress 127.0.0.1 0.01 Error running process: E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "E:\ai_gh_repos\sd.webui\webui\modules\scripts.py", line 386, in process script.process(p, *script_args) File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 655, in process detected_map = preprocessor(input_image, res=pres, thr_a=pthr_a, thr_b=pthr_b) File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\processor.py", line 155, in uniformer from annotator.uniformer import apply_uniformer File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer__init__.py", line 5, in from annotator.uniformer.inference import init_segmentor, inference_segmentor, show_result_pyplot File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer\inference.py", line 7, in from mmseg.datasets.pipelines import Compose ModuleNotFoundError: No module named 'mmseg' "

FaridSafi commented 1 year ago

Working installation method (for endless installation):

  1. Install sd-webui-controlnet, don't wait for it to finish, just make sure folder appears in extensions. Stop the webui.
  2. Activate VENV
  3. Uninstall all prerequisites if some were installed: pip uninstall mmsegmentation pip uninstall mmdet pip uninstall mmcv-full
  4. Install mmcv-full with: pip install psutil ninja pip install openmim mim install mmcv-full
  5. Install other prerequisites: pip install svglib pip install mmdet pip install mmsegmentation
  6. Restart automatic webui. It should start fine.

Verified working in clean automatic webui with latest controlnet. Windows 11. mmcv-full version installed is 1.7.1 For some reason pip is stuck building wheels endlessly when installing it.

could you please explain how to enable VENV ?

ljleb commented 1 year ago

run .\venv\Scripts\activate on windows. (at the root of the webui dir, not the extension)

FaridSafi commented 1 year ago

To fix my issue I had to install C++ Build Tools using https://visualstudio.microsoft.com/visual-cpp-build-tools/ and then :

.\venv\Scripts\activate
pip install mmdet
pip install mmsegmentation
Mikubill commented 1 year ago

Maybe we should consider add local mmcv packages back for this.

Fixed in https://github.com/Mikubill/sd-webui-controlnet/commit/182e87f0baa8bdbc5f146b87c4ad57807dbe609e

dermesut commented 1 year ago

I get no notes anymore, that state that some annotators might not function properly. but, segmentation still doesn't work:

" Error running process: E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer\inference.py", line 8, in from mmseg.datasets.pipelines import Compose ModuleNotFoundError: No module named 'mmseg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\ai_gh_repos\sd.webui\webui\modules\scripts.py", line 386, in process script.process(p, script_args) File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 657, in process detected_map = preprocessor(input_image, res=pres, thr_a=pthr_a, thr_b=pthr_b) File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\scripts\processor.py", line 155, in uniformer from annotator.uniformer import apply_uniformer File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer__init.py", line 4, in from annotator.uniformer.inference import init_segmentor, inference_segmentor, show_result_pyplot File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer\inference.py", line 15, in from annotator.mmpkg.mmseg.models import build_segmentor File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmseg\models\init__.py", line 4, in from .decode_heads import # noqa: F401,F403 File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmseg\models\decode_heads__init__.py", line 4, in from .cc_head import CCHead File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmseg\models\decode_heads\cc_head.py", line 7, in from annotator.mmpkg.mmcv.ops import CrissCrossAttention File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmcv\ops__init__.py", line 10, in from .corner_pool import CornerPool File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmcv\ops\corner_pool.py", line 8, in ext_module = ext_loader.load_ext('_ext', [ File "E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmcv\utils\ext_loader.py", line 15, in load_ext assert hasattr(ext, fun), f'{fun} miss in module {name}' AssertionError: top_pool_forward miss in module _ext "

Mikubill commented 1 year ago

AssertionError: top_pool_forward miss in module _ext

It should be related to https://github.com/Mikubill/sd-webui-controlnet/issues/70 and partically solved by https://github.com/Mikubill/sd-webui-controlnet/commit/eb84fd9c599aa4096f19d262b400012810e4736f since the extension will try to use installed version of mmcv. You can try cleaning up the mmcv in your local environment (use pip uninstall mmcv-full or pip uninstall mmcv) and restart the webui. If it still doesn't work, you may need to manually reinstall mmcv-full - follow https://github.com/Mikubill/sd-webui-controlnet/issues/485#issuecomment-1454739555.

dreanzy commented 1 year ago

断言错误:模块_ext中top_pool_forward未命中

它应该与 #70 相关,并由 eb84fd9 部分解决,因为扩展将尝试使用已安装的 mmcv 版本。您可以尝试清理本地环境中的 mmcv(使用 or )并重新启动 webui。如果它仍然不起作用,您可能需要手动重新安装 mmcv-full - 遵循 #485(评论)。pip uninstall mmcv-full``pip uninstall mmcv

i have already reinstall mmcv like https://github.com/Mikubill/sd-webui-controlnet/issues/485#issuecomment-1454739555 said, but it still not work.

image image

dermesut commented 1 year ago

AssertionError: top_pool_forward miss in module _ext

It should be related to #70 and partically solved by eb84fd9 since the extension will try to use installed version of mmcv. You can try cleaning up the mmcv in your local environment (use pip uninstall mmcv-full or pip uninstall mmcv) and restart the webui. If it still doesn't work, you may need to manually reinstall mmcv-full - follow #485 (comment).

So, i did the pip uninstall mmcv-full thingy, it disappeared from site-packages, I restartet webui and everything now works as before today - the segentation preprocessor image looks the same as it did yesterday. No error message per se, just when first activating the segmentation preprocessor, it says:

... To create a public link, set share=True in launch(). Loading model: control_sd15_seg [fef5e48e] Loaded state_dict from [E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\models\control_sd15_seg.pth] ControlNet model control_sd15_seg [fef5e48e] loaded. Loading preprocessor: segmentation Use Checkpoint: False Checkpoint Number: [0, 0, 0, 0] Use global window for all blocks in stage3 load checkpoint from local path: E:\ai_gh_repos\sd.webui\webui\extensions\sd-webui-controlnet\annotator\uniformer\upernet_global_small.pth 0%| ...

Other than that everythong looks normal. So - a bit confused... "If it still doesn't work, you may need to manually reinstall mmcv-full" - at the current state mmcv is not installed anymore. Does my current state satisfy "it" to not be working? Should I try and install mmcv?

AugmentedRealityCat commented 1 year ago

Just in case, did you also remove ddtailer ? When I had similar problems a couple of weeks ago the solution also required the removal of the ddetailer extension. Just to make sure, please check if you have that installed or not - it might be reinstalling its own version of mmcv-full.

More information in those threads https://github.com/Mikubill/sd-webui-controlnet/issues/70 https://github.com/Mikubill/sd-webui-controlnet/issues/320

dermesut commented 1 year ago

Just in case, did you also remove ddtailer ? When I had similar problems a couple of weeks ago the solution also required the removal of the ddetailer extension. Just to make sure, please check if you have that installed or not - it might be reinstalling its own version of mmcv-full.

More information in those threads #70 #320

i had no ddtailer installed to begin with.