wkpark / uddetailer

μ DDetailer, DDetailer fork to support DDetailer as an extension
GNU Affero General Public License v3.0
63 stars 1 forks source link

After update automatic1111 up to version v1.8.0. gives the following error. #77

Open Zergland opened 7 months ago

Zergland commented 7 months ago

After update automatic1111 up to version v1.8.0. After installation, uddetailer gives the following error.

============== Already up to date. venv "G:\stable-diffusion-automatic1111\venv\Scripts\Python.exe" Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] Version: v1.8.0 Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5 Check mmcv version... Your mmcv version 2.1.0 may not work with mmyolo. or you need to fix version restriction of init.py of mmyolo manually, to use mmcv 2.1.0 with mmyolo. Check mmengine version... your mmengine version is 0.8.5 Launching Web UI with arguments: --api --autolaunch --theme=dark no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. *** Error loading script: ddetailer.py Traceback (most recent call last): File "G:\stable-diffusion-automatic1111\modules\scripts.py", line 527, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "G:\stable-diffusion-automatic1111\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "G:\stable-diffusion-automatic1111\extensions\uddetailer\scripts\ddetailer.py", line 35, in from basicsr.utils.download_util import load_file_from_url ModuleNotFoundError: No module named 'basicsr'


Loading weights [636fe404e3] from G:\stable-diffusion-automatic1111\models\Stable-diffusion\Xpust\Deliberate_v5.safetensors Creating model from config: G:\stable-diffusion-automatic1111\configs\v1-inference.yaml Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 16.0s (prepare environment: 3.1s, import torch: 6.4s, import gradio: 1.3s, setup paths: 1.2s, initialize shared: 0.2s, other imports: 0.7s, load scripts: 1.4s, create ui: 0.7s, gradio launch: 0.4s, add APIs: 0.5s). Applying attention optimization: Doggettx... done. Model loaded in 4.1s (load weights from disk: 0.3s, create model: 1.1s, apply weights to model: 1.9s, load textual inversion embeddings: 0.4s, calculate empty prompt: 0.2s).

How can i fix it?

wkpark commented 7 months ago

it says ModuleNotFoundError: No module named 'basicsr'

I guess something wrong with basicsr python module.

Zergland commented 7 months ago

it says ModuleNotFoundError: No module named 'basicsr'

I guess something wrong with basicsr python module.

I understand this, but how can I fix it? As I understand it, basicsr is not installed automatically. Can I try to install it manually with "pip install basicsr" or is it not worth it? Thanks for the quick response.

wkpark commented 7 months ago

it says ModuleNotFoundError: No module named 'basicsr' I guess something wrong with basicsr python module.

I understand this, but how can I fix it? As I understand it, basicsr is not installed automatically. Can I try to install it manually with "pip install basicsr" or is it not worth it? Thanks for the quick response.

you can install basicsr manually by the following steps:

Zergland commented 7 months ago

it says ModuleNotFoundError: No module named 'basicsr' I guess something wrong with basicsr python module.

I understand this, but how can I fix it? As I understand it, basicsr is not installed automatically. Can I try to install it manually with "pip install basicsr" or is it not worth it? Thanks for the quick response.

you can install basicsr manually by the following steps:

* open cmd prompt

* change to sd-webui dir for example: `cd c:\webui\stable-diffusion-webui`

* activate `venv` : `venv\scripts\activate`

* now you can install `basicsr` by `pip install basicsr`

* or you can check `basicsr` package status by `pip show basicsr`

I installed everything according to your instructions, but it got even worse. Apparently the basicsr project was abandoned and after updates it stopped working. and if I ignore the first error that I wrote about at the beginning, will this affect the operation of your program?

` Already up to date. venv "G:\stable-diffusion-automatic1111\venv\Scripts\Python.exe" Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] Version: v1.8.0 Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5 Check mmcv version... Your mmcv version 2.1.0 may not work with mmyolo. or you need to fix version restriction of init.py of mmyolo manually, to use mmcv 2.1.0 with mmyolo. Check mmengine version... your mmengine version is 0.8.5 Launching Web UI with arguments: --api --autolaunch --theme=dark no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. Loading weights [636fe404e3] from G:\stable-diffusion-automatic1111\models\Stable-diffusion\Xpust\Deliberate_v5.safetensors Creating model from config: G:\stable-diffusion-automatic1111\configs\v1-inference.yaml G:\stable-diffusion-automatic1111\venv\lib\site-packages\mmcv__init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details. warnings.warn( ERROR - failed to import mmyolo - MMCV==1.7.2 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0. *** Error executing callback before_ui for G:\stable-diffusion-automatic1111\extensions\uddetailer\scripts\ddetailer.py Traceback (most recent call last): File "G:\stable-diffusion-automatic1111\modules\script_callbacks.py", line 294, in before_ui_callback c.callback() File "G:\stable-diffusion-automatic1111\extensions\uddetailer\scripts\ddetailer.py", line 322, in startup inference_detector, init_detector, get_classes, Config = get_dependency_modules() File "G:\stable-diffusion-automatic1111\extensions\uddetailer\scripts\ddetailer.py", line 85, in get_dependency_modules from mmdet.core import get_classes File "G:\stable-diffusion-automatic1111\venv\lib\site-packages\mmdet\init__.py", line 16, in assert (mmcv_version >= digit_version(mmcv_minimum_version) AssertionError: MMCV==1.7.2 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.2.0.


loading.. cn_modole

To create a public link, set share=True in launch(). Applying attention optimization: Doggettx... done.

wkpark commented 7 months ago

by commit 0be8d2f75, basicsr dependency removed. (you can update uddetailer at extensions tab)

and it seems mmcv wrongly installed. did you install mmcv manually? remove mmcv by pip uninstall mmcv and try to restart UI again. (or you can just restart your sd-webui by press Apply and restart UI button found at extensions tab. (or restart webui-user.bat, then it will uninstall old mmcv and retry to install matched mmcv version automatically.

Zergland commented 7 months ago

no, mmcv was not installed automatically. I uninstalled mmcv, but after restarting it did not install automatically. I tried to manually install different versions 2.0.0, 2.1.0, 2.0.0rc4 gives the following error when starting ERROR - failed to import mmdet - No module named 'mmcv._ext'

wkpark commented 7 months ago

no, mmcv was not installed automatically. I uninstalled mmcv, but after restarting it did not install automatically. I tried to manually install different versions 2.0.0, 2.1.0, 2.0.0rc4 gives the following error when starting ERROR - failed to import mmdet - No module named 'mmcv._ext'

Please read carefully. https://github.com/wkpark/uddetailer/wiki/Required-python-packages

or you can use uddetailer without mmcv. (in this case, ultralytics or mediapipe need to install manually.)

Zergland commented 7 months ago

Thank you. I'll try to solve the problem, if it works, I'll write how I did it. thanks again for your help.