sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

Segmentation dont work give a lot of errors!?

Open merecesarchviz opened this issue 1 year ago • 4 comments

hi

All the other models works well but the segmentation one give all this errors!:

Loading preprocessor: segmentation Error running process: F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "F:\SD\stable-diffusion-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 "F:\SD\stable-diffusion-webui\modules\scripts.py", line 386, in process script.process(p, *script_args) File "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 753, in process detected_map, is_image = preprocessor(input_image, res=pres, thr_a=pthr_a, thr_b=pthr_b) File "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 155, in uniformer from annotator.uniformer import apply_uniformer File "F:\SD\stable-diffusion-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 "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\uniformer\inference.py", line 15, in from annotator.mmpkg.mmseg.models import build_segmentor File "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmseg\models_init_.py", line 4, in from .decode_heads import * # noqa: F401,F403 File "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmseg\models\decode_heads_init_.py", line 4, in from .cc_head import CCHead File "F:\SD\stable-diffusion-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 "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmcv\ops_init_.py", line 10, in from .corner_pool import CornerPool File "F:\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\mmpkg\mmcv\ops\corner_pool.py", line 8, in ext_module = ext_loader.load_ext('_ext', [ File "F:\SD\stable-diffusion-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

merecesarchviz avatar Mar 06 '23 11:03 merecesarchviz

Consider install mmsegmentation or uninstall mmcv/mmcv-full

Mikubill avatar Mar 06 '23 13:03 Mikubill

Just added more fallbacks for mmpkg, update the extension may fix this.

Mikubill avatar Mar 06 '23 13:03 Mikubill

This is the last updated version of the extension, how we can install the mmsegmentation that you refer in the extension?

merecesarchviz avatar Mar 06 '23 13:03 merecesarchviz

Update the extension to the latest version, (check if already fixed), then use pip install mmdet mmsegmentation to install the mmsegmentation. (don't forget to activate venv) If segmentation still broken after installation, follow the instructions in https://github.com/Mikubill/sd-webui-controlnet/issues/485#issuecomment-1454739555

Mikubill avatar Mar 06 '23 14:03 Mikubill