Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you list required versions? Have MMCV 2.1.0 installed but mmyolo says it needs mmcv 2.0< so it gets uninstalled / upgraded on launch #54

Open
CCpt5 opened this issue Nov 28, 2023 · 31 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@CCpt5
Copy link

CCpt5 commented Nov 28, 2023

Hello again! On a different extension of yours this time! :)

Thanks for taking this on - I never actually used the old one, but seeing that different checkpoints can be used for the after generation touchups, I'm excited that it may be possible to fix the "similar faces" or have two different people added to images.

But my problem is install. I've had a very difficult time. I read your note about the thread for issues w/ the mmcv wheel/install. I got past that after a bunch of trial and error. However, now I'm stuck w/ an incompatibility between mmcv and mmyolo. The latest mmcv is 2.1.0 and I was on that, but downgraded to 2.0.0 which failed, and even tried 1.7.0 full per this thread about the same error I was getter from the original repo: dustysys#38 (comment)

The solution there seems like it'll work which is:

Found a solution to 'No module named 'mmdet.core''. Maybe because mmdet==3.0.0 has no core.
I uninstall mmdet 3.0.0 then install mmdet 2.25.3 and the problem is fixed.
Note that mmdet 2.25.3 is incompatible with mmcv>=2.0.0, so you also need to uninstall mmcv 2.0.0 and install mmcv-full 1.7.0.
Hopes this will help.

But again when I launch A1111 it checks the versions and automatically updates mmcv.

Here is my launch console. If you can advise on proper versions to use that will not trigged changes on launch, or if necessary a way to disable checking/changing versions I'd very much appreciate it!

venv "D:\Stable-Diffusion-Webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Installing frame2frame requirement: opencv-python
Found existing installation: mmdet 2.28.0
Uninstalling mmdet-2.28.0:
  Successfully uninstalled mmdet-2.28.0
Found existing installation: mmcv-full 1.7.0
Uninstalling mmcv-full-1.7.0:
  Successfully uninstalled mmcv-full-1.7.0
Uninstalling mmdet, mmcv, mmcv-full... (if installed)
Installing mmcv, mmdet, mmengine...
Installing mmcv
Installing mmdet
Installing mmdet
Check mmcv version...
Your mmcv version 2.1.0 may not work mmyolo.
Please install mmcv version 2.0.0 manually or uninstall mmcv and restart UI again to install mmcv 2.0.0
Check mmengine version...
your mmengine version is 0.8.5
Launching Web UI with arguments: --opt-sdp-attention --no-half-vae --opt-channelslast --disable-safe-unpickle --skip-torch-cuda-test --disable-nan-check --skip-version-check --ckpt-dir e:\stable Diffusion Checkpoints
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 23.11.1, num models: 9
2023-11-27 20:30:34,011 - ControlNet - INFO - ControlNet v1.1.419
ControlNet preprocessor location: D:\Stable-Diffusion-Webui\extensions\3sd-webui-controlnet\annotator\downloads
2023-11-27 20:30:34,062 - ControlNet - INFO - ControlNet v1.1.419
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[sd-webui-freeu] Controlnet support: *enabled*
ERROR - failed to import mmyolo - MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.
Check config files...
Done
 Total 4 mmdet, 0 yolo and 3 mediapipe models.
SUCCESS - success to load config for D:\Stable-Diffusion-Webui\models\mmdet\segm\mmdet_dd-person_mask2former.pth!
 You can enable model validity tester in the Settings-> μ DDetailer.
SUCCESS - success to load config for D:\Stable-Diffusion-Webui\models\mmdet\bbox\mmdet_anime-face_yolov3.pth!
SUCCESS - success to load config for D:\Stable-Diffusion-Webui\models\mmdet\segm\yolov5_ins_n.pth!
SUCCESS - success to load config for D:\Stable-Diffusion-Webui\models\mmdet\segm\yolov5_ins_s.pth!
 Total 4 valid mmdet configs are found.
 You can disable validity tester in the Settings-> μ DDetailer.
Loading weights [74dda471cc] from e:\stable Diffusion Checkpoints\SDXL\realvisxlV20_v20Bakedvae.safetensors
2023-11-27 20:30:35,375 - AnimateDiff - INFO - Injecting LCM to UI.
Creating model from config: D:\Stable-Diffusion-Webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Loading VAE weights specified in settings: D:\Stable-Diffusion-Webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: sdp-no-mem... done.
Model loaded in 3.6s (load weights from disk: 0.6s, create model: 0.2s, apply weights to model: 2.2s, load VAE: 0.1s, load textual inversion embeddings: 0.1s, calculate empty prompt: 0.1s).
loading.. cn_modole
 - ControlNet extension 3sd-webui-controlnet found
 - default µ DDetailer model= bbox/mmdet_anime-face_yolov3.pth [38208bb6]
2023-11-27 20:30:39,066 - AnimateDiff - INFO - Hacking i2i-batch.
 - default µ DDetailer model= bbox/mmdet_anime-face_yolov3.pth [38208bb6]
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 20.6s (prepare environment: 10.3s, import torch: 1.9s, import gradio: 0.4s, setup paths: 0.3s, initialize shared: 0.2s, other imports: 0.4s, list SD models: 0.2s, load scripts: 2.2s, create ui: 4.2s, gradio launch: 0.4s, app_started_callback: 0.1s).

I also used Chatgpt4 premium to try get this working and if interested here are shareable links to those chats - it shows where I started (different errors gettign mmcv install which I looked up and fixed per your front page) but then others until ultimately where I'm at where I think all versions will work but the laucnh check is changing them back to incompatible versions.

Chatgpt logs from today:

https://chat.openai.com/share/e86cfded-6cf0-4467-b34b-debbc1ab59bf

@CCpt5
Copy link
Author

CCpt5 commented Nov 28, 2023

Update:

Just noticed you posted recommended versions in a closed thread (hidden by default) - I'll try these and hopefully they won't be changed during the launch process Re: Your post:

#45 (comment)

I've installed the latest packages to check for recent issues.
and found that the latest mmcv, mmdet and mmengine have some issues.

only mmcv == 2.0.0 work with mmyolo 0.6.0
the mmengine 0.9.x has some issues with bitsandbytes. (bitsandbytes 0.9.x is not work properly under windows)
these are recommended versions

mmcv == 2.0.0
mmdet >= 3.0.0
mmengine == 0.8.5

@wkpark
Copy link
Owner

wkpark commented Nov 28, 2023

thank you for your reporting in another extension :)

this is a short note.

currently Im using mmcv == 2.1.0, mmdet >=3.0.0, mmengine == 0.9.1 under windows, with mmyolo 0.6.0

  • patched mmyolo 0.6.0. - simply fix version restriction at venv/Lib/site-packages/mmyolo/__init__.py (fix mmcv_maximum_version = '2.1.0' to mmcv_maximum_version = '2.1.1' works fine.
  • mmengine 0.9.1 + patched bitsnbytes at https://github.com/wkpark/bitsandbytes/actions/runs/6887358987 (login github and scroll down you will find a downloadable artifacts)

@CCpt5
Copy link
Author

CCpt5 commented Nov 28, 2023

Trying to do this now, and can't get past the last part about Bitsandbytes. I'm not using Conda (just the webui env). I tried extracting the windows folders for bits and bytes in the webui site-packages but got a pip up error (couldn't screenshot) about bad code. I tried normal install of bitsandbytes but that changed versions again and led to that module not found error.

Reinstalled proper versions (mmyolo is patched now), and tried to copy over just the cuda files from the extraction and got a CUDA error that I can't get past. It seems like the CUDA version in the extraction is 11.8 - I have 12.1 installed for other apps/extensions. Perhaps CUDA 11.8 is necessary? If that's the only solution I'll need to see what exactly relies on 12.1 first - or maybe I can have both installed....although I'd prefer not.

My most recent terminal log:

venv "D:\Stable-Diffusion-Webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Installing frame2frame requirement: opencv-python
Launching Web UI with arguments: --opt-sdp-attention --no-half-vae --opt-channelslast --disable-safe-unpickle --skip-torch-cuda-test --disable-nan-check --skip-version-check --ckpt-dir e:\stable Diffusion Checkpoints
False

===================================BUG REPORT===================================
D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\cuda_setup\main.py:166: UserWarning: Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes


  warn(msg)
================================================================================
The following directories listed in your path were found to be non-existent: {WindowsPath('tmp/restart')}
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
DEBUG: Possible options found for libcudart.so: set()
CUDA SETUP: PyTorch settings found: CUDA_VERSION=121, Highest Compute Capability: 8.9.
CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md
CUDA SETUP: Loading binary D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable
CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null
CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a
CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc
CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA.
CUDA SETUP: Solution 2a): Download CUDA install script: wget https://github.com/TimDettmers/bitsandbytes/blob/main/cuda_install.sh
CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO.
CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local
Traceback (most recent call last):
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\transformers\modeling_utils.py", line 85, in <module>
    from accelerate import __version__ as accelerate_version
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\accelerate\__init__.py", line 3, in <module>
    from .accelerator import Accelerator
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\accelerate\accelerator.py", line 35, in <module>
    from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\accelerate\checkpointing.py", line 24, in <module>
    from .utils import (
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\accelerate\utils\__init__.py", line 131, in <module>
    from .bnb import has_4bit_bnb_layers, load_and_quantize_model
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\accelerate\utils\bnb.py", line 42, in <module>
    import bitsandbytes as bnb
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\__init__.py", line 6, in <module>
    from . import cuda_setup, utils, research
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\research\__init__.py", line 1, in <module>
    from . import nn
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\research\nn\__init__.py", line 1, in <module>
    from .modules import LinearFP8Mixed, LinearFP8Global
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in <module>
    from bitsandbytes.optim import GlobalOptimManager
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\optim\__init__.py", line 6, in <module>
    from bitsandbytes.cextension import COMPILED_WITH_CUDA
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\bitsandbytes\cextension.py", line 20, in <module>
    raise RuntimeError('''
RuntimeError:
        CUDA Setup failed despite GPU being available. Please run the following command to get more information:

        python -m bitsandbytes

        Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
        to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
        and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "D:\stable-diffusion-webui\launch.py", line 44, in main
    start()
  File "D:\stable-diffusion-webui\modules\launch_utils.py", line 432, in start
    import webui
  File "D:\stable-diffusion-webui\webui.py", line 13, in <module>
    initialize.imports()
  File "D:\stable-diffusion-webui\modules\initialize.py", line 16, in imports
    import pytorch_lightning  # noqa: F401
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\pytorch_lightning\__init__.py", line 35, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\pytorch_lightning\utilities\types.py", line 27, in <module>
    from torchmetrics import Metric
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\torchmetrics\__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\torchmetrics\functional\__init__.py", line 120, in <module>
    from torchmetrics.functional.text._deprecated import _bleu_score as bleu_score
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\torchmetrics\functional\text\__init__.py", line 50, in <module>
    from torchmetrics.functional.text.bert import bert_score  # noqa: F401
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\torchmetrics\functional\text\bert.py", line 23, in <module>
    from torchmetrics.functional.text.helper_embedding_metric import (
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\torchmetrics\functional\text\helper_embedding_metric.py", line 27, in <module>
    from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "D:\Stable-Diffusion-Webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):

        CUDA Setup failed despite GPU being available. Please run the following command to get more information:

        python -m bitsandbytes

        Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
        to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
        and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues
Press any key to continue . . .

List of versions I have installed:

(venv) D:\Stable-Diffusion-Webui>pip freeze
3-1==1.0.0
absl-py==2.0.0
accelerate==0.21.0
addict==2.4.0
aenum==3.1.15
aiofiles==23.2.1
aiohttp==3.9.1
aiosignal==1.3.1
aliyun-python-sdk-core==2.14.0
aliyun-python-sdk-kms==2.16.2
altair==5.1.2
antlr4-python3-runtime==4.9.3
anyio==3.7.1
async-timeout==4.0.3
attrs==23.1.0
basicsr==1.4.2
beautifulsoup4==4.12.2
bitsandbytes==0.41.2.post2
blendmodes==2022
boltons==23.1.1
cachetools==5.3.2
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
clean-fid==0.1.35
click==8.1.7
clip==1.0
colorama==0.4.6
contourpy==1.2.0
crcmod==1.7
cryptography==41.0.7
cssselect2==0.7.0
cycler==0.12.1
decorator==4.0.11
deprecation==2.1.0
dynamicprompts==0.29.0
einops==0.4.1
exceptiongroup==1.2.0
facexlib==0.3.0
fastapi==0.94.0
ffmpy==0.3.1
filelock==3.13.1
filterpy==1.4.5
flatbuffers==23.5.26
fonttools==4.45.1
frozenlist==1.4.0
fsspec==2023.10.0
ftfy==6.1.3
future==0.18.3
fvcore==0.1.5.post20221221
gdown==4.7.1
gfpgan==1.3.8
gitdb==4.0.11
GitPython==3.1.32
google-auth==2.23.4
google-auth-oauthlib==1.1.0
gradio==3.41.2
gradio_client==0.5.0
grpcio==1.59.3
h11==0.12.0
httpcore==0.15.0
httpx==0.24.1
huggingface-hub==0.19.4
idna==3.6
imageio==2.33.0
imageio-ffmpeg==0.4.9
importlib-metadata==6.8.0
importlib-resources==6.1.1
inflection==0.5.1
iopath==0.1.9
Jinja2==3.1.2
jmespath==0.10.0
jsonmerge==1.8.0
jsonschema==4.20.0
jsonschema-specifications==2023.11.1
kiwisolver==1.4.5
kornia==0.6.7
lark==1.1.2
lazy_loader==0.3
lightning-utilities==0.10.0
llvmlite==0.41.1
lmdb==1.4.1
lpips==0.1.4
lxml==4.9.3
Markdown==3.5.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib==3.8.2
mdurl==0.1.2
mediapipe==0.10.8
mmcv==2.1.0
mmdet==3.2.0
mmengine==0.9.1
mmyolo==0.6.0
model-index==0.1.11
moviepy==0.2.3.2
mpmath==1.3.0
multidict==6.0.4
networkx==3.2.1
numba==0.58.1
numpy==1.23.5
oauthlib==3.2.2
omegaconf==2.2.3
open-clip-torch==2.20.0
opencv-contrib-python==4.8.1.78
opencv-python==4.8.1.78
opendatalab==0.0.10
openmim==0.3.9
openxlab==0.0.29
ordered-set==4.1.0
orjson==3.9.10
oss2==2.17.0
packaging==23.2
pandas==2.1.3
piexif==1.1.3
Pillow==9.5.0
platformdirs==4.0.0
portalocker==2.8.2
prettytable==3.9.0
protobuf==3.20.0
psutil==5.9.5
py-cpuinfo==9.0.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycocotools==2.0.7
pycparser==2.21
pycryptodome==3.19.0
pydantic==1.10.13
pydub==0.25.1
Pygments==2.17.2
pyparsing==3.1.1
PySocks==1.7.1
python-dateutil==2.8.2
python-multipart==0.0.6
pytorch-lightning==1.9.4
pytz==2023.3.post1
PyWavelets==1.5.0
pywin32==306
PyYAML==6.0.1
realesrgan==0.3.0
referencing==0.31.0
regex==2023.10.3
reportlab==4.0.7
requests==2.28.2
requests-oauthlib==1.3.1
resize-right==0.0.2
rich==13.4.2
rpds-py==0.13.1
rsa==4.9
safetensors==0.3.1
scikit-image==0.21.0
scipy==1.11.4
seaborn==0.13.0
semantic-version==2.10.0
Send2Trash==1.8.2
sentencepiece==0.1.99
shapely==2.0.2
six==1.16.0
smmap==5.0.1
sniffio==1.3.0
sounddevice==0.4.6
soupsieve==2.5
starlette==0.26.1
svglib==1.5.1
sympy==1.12
tabulate==0.9.0
tb-nightly==2.16.0a20231127
tensorboard-data-server==0.7.2
termcolor==2.3.0
terminaltables==3.1.10
tf-keras-nightly==2.16.0.dev2023112710
thop==0.1.1.post2209072238
tifffile==2023.9.26
timm==0.9.2
tinycss2==1.2.1
tokenizers==0.13.3
tomesd==0.1.3
tomli==2.0.1
toolz==0.12.0
torch==2.1.1+cu121
torchaudio==2.1.1+cu121
torchdiffeq==0.2.3
torchmetrics==1.2.0
torchsde==0.2.5
torchvision==0.16.1+cu121
tqdm==4.65.2
trampoline==0.1.2
transformers==4.30.2
typing_extensions==4.8.0
tzdata==2023.3
ultralytics==8.0.219
urllib3==1.26.18
uvicorn==0.24.0.post1
wcwidth==0.2.12
webencodings==0.5.1
websockets==11.0.3
Werkzeug==3.0.1
yacs==0.1.8
yapf==0.40.2
yarl==1.9.3
zipp==3.17.0

(venv) D:\Stable-Diffusion-Webui>

@wkpark
Copy link
Owner

wkpark commented Nov 29, 2023

ahh. my mistake. if so,.... downgrade mmengine 0.8.5 will work.

bitsandbytes for cuda 12.1 windows also available at (scroll down and download bitsandbytes for cuda12.1 win)
https://github.com/wkpark/bitsandbytes/actions/runs/7028287385
https://github.com/wkpark/bitsandbytes/actions/runs/7030297936

@CCpt5
Copy link
Author

CCpt5 commented Nov 29, 2023

Ok, so I tried 0.8.5 and then got an error about a missing controlnet file(cn_module.py?). Buuuut after getting that error, I decided to delete the extension folder, and this time Git clone it directly from this repo. I had first seen uddetailer on the A1111 extension list a few days ago and installed it using the in-app installer. I'm not sure if using the app installer could have issues properly installing/setting this up, but after deleting the folder and installing directly I no longer have any uddetailer errors on launch!

If you find other users having issues w/ installing the extension you may want to try installing it yourself from the in-app installer to make sure that it works on your end. I'm happy it seems to be setup properly now so I'm not going to attempt an uninstall/reinstall from the app right now :)

BTW if you have a kofi or anything like that drop a link sometime - appreciate your efforts resurrecting these extensions giving them new life w/ all the new advancements the past months......

@wkpark
Copy link
Owner

wkpark commented Nov 29, 2023

Ok, so I tried 0.8.5 and then got an error about a missing controlnet file(cn_module.py?). Buuuut after getting that error, I decided to delete the extension folder, and this time Git clone it directly from this repo. I had first seen uddetailer on the A1111 extension list a few days ago and installed it using the in-app installer. I'm not sure if using the app installer could have issues properly installing/setting this up, but after deleting the folder and installing directly I no longer have any uddetailer errors on launch!

If you find other users having issues w/ installing the extension you may want to try installing it yourself from the in-app installer to make sure that it works on your end. I'm happy it seems to be setup properly now so I'm not going to attempt an uninstall/reinstall from the app right now :)

BTW if you have a kofi or anything like that drop a link sometime - appreciate your efforts resurrecting these extensions giving them new life w/ all the new advancements the past months......

Thank you for your patience and feedback!

Lots of people install and use it, but not many are willing to give any feedback or fix it - thanks for that.

and this is my ko-fi https://ko-fi.com/wkpark :)

@rafstahelin
Copy link

thank you for your reporting in another extension :)

this is a short note.

currently Im using mmcv == 2.1.0, mmdet >=3.0.0, mmengine == 0.9.1 under windows, with mmyolo 0.6.0

  • patched mmyolo 0.6.0. - simply fix version restriction at venv/Lib/site-packages/mmyolo/__init__.py (fix mmcv_maximum_version = '2.1.0' to mmcv_maximum_version = '2.1.1' works fine.
  • mmengine 0.9.1 + patched bitsnbytes at https://github.com/wkpark/bitsandbytes/actions/runs/6887358987 (login github and scroll down you will find a downloadable artifacts)

hello
is still worth fixing?

Currently:
Your mmcv version 2.1.0 may not work mmyolo.
*** Please install mmcv version 2.0.0 manually or uninstall mmcv and restart UI again to install mmcv 2.0.0
*** Check mmengine version...
*** your mmengine version is 0.8.5
*** Installing mmyolo

Should i downgrade to 2.0.0

I tried git cloning instead of in-app, still broken. Please do let me know. In Windows 11. Python 3.10.9 Cuda 12.1

@wkpark
Copy link
Owner

wkpark commented Feb 13, 2024

thank you for your reporting in another extension :)
this is a short note.
currently Im using mmcv == 2.1.0, mmdet >=3.0.0, mmengine == 0.9.1 under windows, with mmyolo 0.6.0

  • patched mmyolo 0.6.0. - simply fix version restriction at venv/Lib/site-packages/mmyolo/__init__.py (fix mmcv_maximum_version = '2.1.0' to mmcv_maximum_version = '2.1.1' works fine.
  • mmengine 0.9.1 + patched bitsnbytes at https://github.com/wkpark/bitsandbytes/actions/runs/6887358987 (login github and scroll down you will find a downloadable artifacts)

hello is still worth fixing?

Yes. mmcv 2.1.1 works fine with manual fix.

Currently: Your mmcv version 2.1.0 may not work mmyolo. *** Please install mmcv version 2.0.0 manually or uninstall mmcv and restart UI again to install mmcv 2.0.0 *** Check mmengine version... *** your mmengine version is 0.8.5 *** Installing mmyolo

Should i downgrade to 2.0.0

I tried git cloning instead of in-app, still broken. Please do let me know. In Windows 11. Python 3.10.9 Cuda 12.1

Please see also https://github.com/wkpark/uddetailer/wiki/Required-python-packages

@rafstahelin
Copy link

i dont see mmyolo at "venv/Lib/site-packages/mmyolo/init.py"
Also, noticing mmengine 0.9.1 only seems to be available for Cuda 11.8? I am running in 12.1 in python 3.10.9
I installed via git clone in my windows 11
image
please advise thanks

@rafstahelin
Copy link

I should add, I am in Forge webi

@wkpark
Copy link
Owner

wkpark commented Feb 14, 2024

I should add, I am in Forge webi

without mmdet/mmcv/mmyolo, you can use mediapipe models or ultralytics yolov8 models

I can confirm that mmcv==2.1.0 + mmengine==0.8.5 + mmyolo 0.6 (with fix)

(venv) D:\src\stable-diffusion-webui-forge>pip show mmyolo
Name: mmyolo
Version: 0.6.0
Summary: OpenMMLab Toolbox of YOLO
Home-page: https://github.com/open-mmlab/mmyolo
Author: MMYOLO Contributors
Author-email: [email protected]
License: GPL License 3.0
Location: d:\src\stable-diffusion-webui-forge\venv\lib\site-packages
Requires: numpy, prettytable
Required-by:

(venv) D:\src\stable-diffusion-webui-forge>pip show mmengine
Name: mmengine
Version: 0.8.5
Summary: Engine of OpenMMLab projects
Home-page: https://github.com/open-mmlab/mmengine
Author: MMEngine Authors
Author-email: [email protected]
License: UNKNOWN
Location: d:\src\stable-diffusion-webui-forge\venv\lib\site-packages
Requires: addict, matplotlib, numpy, opencv-python, pyyaml, regex, rich, termcolor, yapf
Required-by: mmcv

(venv) D:\src\stable-diffusion-webui-forge>pip show mmcv
Name: mmcv
Version: 2.1.0
Summary: OpenMMLab Computer Vision Foundation
Home-page: https://github.com/open-mmlab/mmcv
Author: MMCV Contributors
Author-email: [email protected]
License:
Location: d:\src\stable-diffusion-webui-forge\venv\lib\site-packages
Requires: addict, mmengine, numpy, opencv-python, packaging, Pillow, pyyaml, regex, yapf
Required-by:

@rafstahelin
Copy link

How would I do that. I'm getting the massive mmcv error nesssage. How do I replace mmcv fir other model? Do you have a step by step please?

@wkpark
Copy link
Owner

wkpark commented Feb 14, 2024

How would I do that. I'm getting the massive mmcv error nesssage. How do I replace mmcv fir other model? Do you have a step by step please?

open cmd prompt and install mmcv again. for example

cd to_your_sdwebui-forge # goto sdwebu-forge
venv\scripts\activate # activate venv
pip show mmcv # show current mmcv version

and install mmcv again using mim

mim install mmcv==2.1.0

@rafstahelin
Copy link

this is the output of pip show mmcv:
(venv) E:\forge-webui>pip show mmcv Name: mmcv Version: 2.1.0 Summary: OpenMMLab Computer Vision Foundation Home-page: https://github.com/open-mmlab/mmcv Author: MMCV Contributors Author-email: [email protected] License: Location: e:\forge-webui\venv\lib\site-packages Requires: addict, mmengine, numpy, opencv-python, packaging, Pillow, pyyaml, regex, yapf Required-by:

Should i do mim uninstall then mim install?

@rafstahelin
Copy link

still dont see mmyolo folder with init. what else do i need to do after installing 2.1.0?

@wkpark
Copy link
Owner

wkpark commented Feb 14, 2024

still dont see mmyolo folder with init. what else do i need to do after installing 2.1.0?

you can install mmyolo using mim install command.

  • mim install mmyolo (automatically installed by installer)
  • or python -m mim install mmyolo

(there seems to be an issue as mmyolo is not installing automatically, I guess)

all other python packages could be installed using pip install. for example

  • pip install ultralytics (you need to install it manually)

@rafstahelin
Copy link

rafstahelin commented Feb 14, 2024

ok, when i run mim install mmyolo i get:
RuntimeError:
The detected CUDA version (11.8) mismatches the version that was used to compile PyTorch (12.1). Please make sure to use the same CUDA versions.

I compiled Forge webui using 12.1 cuda

`note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of mmcv
Moving to e:\forge-webui\venv\lib\site-packages\mmcv-2.1.0.dist-info
from E:\forge-webui\venv\Lib\site-packages~mcv-2.1.0.dist-info
Moving to e:\forge-webui\venv\lib\site-packages\mmcv
from E:\forge-webui\venv\Lib\site-packages~mcv
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mmcv

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

Does it not work with 12.1?

(venv) E:\forge-webui>pip show torch
Name: torch
Version: 2.1.2+cu121

Do i need to change the mmengine 0.9.1 to 12.1 cuda?

@wkpark
Copy link
Owner

wkpark commented Feb 14, 2024

recommended mmengine version is mmengine-0.8.5.
my torch version is 2.1.2+cu118, so I can't test/tell your settings is working or not, sorry.

but, there are official document exist for mmcv+cu121:
https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-mmcv
and it says, to install mmcv+cu121
pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html

@rafstahelin
Copy link

yea alright, not gonna work for people on cuda 12.1
thanks for your help

@rafstahelin
Copy link

ok, so i went ahead and installed Pytorch2.1.2+Cuda11.8 like you and ran with xformers.
mmcv 2.1.0 doesnt work for me. I guess I will just run as you say with mediapipe and yolo9
thanks

Here's the console:
`venv "E:\stable-diffusion-webui-forge\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: f0.0.12-latest-155-gd81e353d
Commit hash: d81e353d8928147bbd973068d0efbb2802affe0f
*** Error running install.py for extension E:\stable-diffusion-webui-forge\extensions\uddetailer.
*** Command: "E:\stable-diffusion-webui-forge\venv\Scripts\python.exe" "E:\stable-diffusion-webui-forge\extensions\uddetailer\install.py"
*** Error code: 1
*** stdout: Check mmcv version...
*** Your mmcv version 2.1.0 may not work mmyolo.
*** Please install mmcv version 2.0.0 manually or uninstall mmcv and restart UI again to install mmcv 2.0.0
*** Check mmengine version...
*** your mmengine version is 0.8.5
*** Installing mmyolo


*** stderr: Traceback (most recent call last):
*** File "E:\stable-diffusion-webui-forge\extensions\uddetailer\install.py", line 123, in
*** install()
*** File "E:\stable-diffusion-webui-forge\extensions\uddetailer\install.py", line 95, in install
*** run(f'"{python}" -m mim install mmyolo', desc="Installing mmyolo", errdesc="Couldn't install mmyolo")
*** File "E:\stable-diffusion-webui-forge\modules\launch_utils.py", line 124, in run
*** raise RuntimeError("\n".join(error_bits))
*** RuntimeError: Couldn't install mmyolo.
*** Command: "E:\stable-diffusion-webui-forge\venv\Scripts\python.exe" -m mim install mmyolo
*** Error code: 1
*** stdout: Looking in links: https://download.openmmlab.com/mmcv/dist/cu118/torch2.1.0/index.html
*** Collecting mmyolo
*** Using cached mmyolo-0.6.0-py3-none-any.whl.metadata (23 kB)
*** Requirement already satisfied: numpy in e:\stable-diffusion-webui-forge\venv\lib\site-packages (from mmyolo) (1.26.2)
*** Requirement already satisfied: prettytable in e:\stable-diffusion-webui-forge\venv\lib\site-packages (from mmyolo) (3.9.0)
*** Collecting mmcv<2.1.0,>=2.0.0rc4 (from mmyolo)
*** Using cached mmcv-2.0.1.tar.gz (469 kB)
*** Preparing metadata (setup.py): started
*** Preparing metadata (setup.py): finished with status 'done'`

@wkpark
Copy link
Owner

wkpark commented Feb 16, 2024

It seems mim install mmyolo command tried to install mmcv==2.0.1 again with cuda 11.8 build. and it cause the issue.

I suggest you the following command:

  • pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html # install mmcv first.
  • pip install mmyolo

@wkpark wkpark added the bug Something isn't working label Feb 16, 2024
@wkpark wkpark closed this as completed in db8acda Feb 16, 2024
@wkpark wkpark reopened this Feb 16, 2024
@rafstahelin
Copy link

rafstahelin commented Feb 16, 2024 via email

@rafstahelin
Copy link

tried the above on my 12.1 torch install (i tried different forge webui installations with 11.8 and 12.1)
With the 12.1 torch install, and your pop install 2.1.0 then mmyolo i got a clean console, but when i launched webui i go this:
ERROR - failed to import mmyolo - MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.
I guess i am gonna run without mmyolo.

How do i remove this from the startup? I dont want this message on every startup. Thanks

@wkpark
Copy link
Owner

wkpark commented Feb 16, 2024

tried the above on my 12.1 torch install (i tried different forge webui installations with 11.8 and 12.1) With the 12.1 torch install, and your pop install 2.1.0 then mmyolo i got a clean console, but when i launched webui i go this: ERROR - failed to import mmyolo - MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0. I guess i am gonna run without mmyolo.

How do i remove this from the startup? I dont want this message on every startup. Thanks

no. no. that's good message.
after install mmyolo, you have to fix __init__.py of mmyolo file. that's was missing point.

patched mmyolo 0.6.0. - simply fix version restriction at venv/Lib/site-packages/mmyolo/__init__.py (fix mmcv_maximum_version = '2.1.0' to mmcv_maximum_version = '2.1.1' works fine.

TL;DR

  • torch 2.0.x - mmcv 2.0.1 + mmyolo 0.6.0 - OK
  • torch 2.1.x - mmcv 2.1.1 + mmyolo 0.6.0 - need to fix version restriction of __init__.py of mmyolo manually.

@wkpark
Copy link
Owner

wkpark commented Feb 16, 2024

ERROR - failed to import mmyolo - MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.
this message is from mmyolo package. I guess, you've install mmyolo without venv environment.

in this case, deactivate venv first, and pip uninstall mmyolo, then activate venv again and pip install mmyolo

you can check mmyolo package by pip show mmyolo.

@rafstahelin
Copy link

E:\forge-webui>pip uninstall mmyolo
WARNING: Skipping mmyolo as it is not installed.

Weird. It is not installed

@rafstahelin
Copy link

rafstahelin commented Feb 16, 2024

success!!

image

@rafstahelin
Copy link

I just uninstalled it inside my venv the reinstalled it mmyolo and changed to amx 2.1.1 in the init
Dont know why it didnt work the first time around
thanks for your help

@wkpark
Copy link
Owner

wkpark commented Feb 25, 2024

fixed controlnet support for forge. PR #75

@galavera
Copy link

galavera commented Mar 5, 2024

thank you for your reporting in another extension :)

this is a short note.

currently Im using mmcv == 2.1.0, mmdet >=3.0.0, mmengine == 0.9.1 under windows, with mmyolo 0.6.0

  • patched mmyolo 0.6.0. - simply fix version restriction at venv/Lib/site-packages/mmyolo/__init__.py (fix mmcv_maximum_version = '2.1.0' to mmcv_maximum_version = '2.1.1' works fine.
  • mmengine 0.9.1 + patched bitsnbytes at https://github.com/wkpark/bitsandbytes/actions/runs/6887358987 (login github and scroll down you will find a downloadable artifacts)

I uninstalled mmyolo, reinstalled, changed init max version settings, and I'm still getting this error. removed pycache, restarted system as well after making changes.

Warning - ultralytics for yolov8 is not available.
ERROR - failed to import mmyolo - MMCV==2.1.0 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

@galavera
Copy link

galavera commented Mar 5, 2024

well, after installing and uninstalling a few times I finally got it working.
installing mmcv first using -f flag probably did the trick.
pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants