Skip to content

[Issue]: Issues with DWopenpose installation and loading #3191

Open
@devils-shadow

Description

@devils-shadow

132732-783616_INFO_Starting_SD..txt

Issue Description

Upon initial load of the DWpose controlnet model, SDN attempts to install its requirements but fails when attempting to install mmcv:
image111

Running the same command in venv shows that it attempts to install mmcv 2.2.0 and errors out in attempting to do so:
image1112

Installing mmcv 2.2.0 via pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.3/index.html completes successfully, but SDN doesn't like the version, it expects 2.0.0rc4 :
ERROR Control Processor load failed: id="DWPose" error=MMCV==2.2.0 is used but incompatible.

Cleaning up and installing 2.0.0rc4 using the same technique as above also works as expected, and now SDN no longer warns of the version mismatch. But now another error is encountered:
19:22:49-211082 ERROR Control processor DWPose: DLL load failed while importing _ext: The specified module could not be found. 19:22:49-313600 ERROR Control processor DWPose: DLL load failed while importing _ext: The specified module could not be found. 19:22:49-315596 ERROR Control processor DWPose: OpenMMLab is not installed

For this, an older SDN ticket exists: #2877
The proposed solution in the linked ticket is running the following in venv:
WindowsTerminal_AE2B6zu1Og

Sadly the DLL load failed/OpenMMLab is not installed errors still persist.

Please note that the attached log file is from a different user experiencing the same issue (failed mmcv install).

Version Platform Description

Python 3.10.11 on Windows
Version: app=sd.next updated=2024-06-01 hash=06f9d6b6 branch=master
Platform: arch=AMD64 cpu=AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD system=Windows
release=Windows-10-10.0.22631-SP0 python=3.10.11
nVidia CUDA toolkit detected: nvidia-smi present
Extensions: disabled=['sdnext-modernui']
Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg'] extensions-builtin
Extensions: enabled=['a1111-sd-webui-tagcomplete', 'adetailer', 'sd-civitai-browser-plus'] extensions
Startup: standard
Load packages: {'torch': '2.3.0+cu121', 'diffusers': '0.28.0', 'gradio': '3.43.2'}
VRAM: Detected=11.99 GB Optimization=none
Engine: backend=Backend.DIFFUSERS compute=cuda device=cuda attention="Scaled-Dot-Product" mode=no_grad
Device: device=NVIDIA GeForce RTX 4070 n=1 arch=sm_90 cap=(8, 9) cuda=12.1 cudnn=8801 driver=552.44

Relevant log output

13:29:48-810163 DEBUG    Control Processor loading: id="DWPose"                
                         class=DWposeDetector                                  
13:29:49-135640 DEBUG    Package not found: mmcv                               
13:29:49-136640 INFO     Installing package: mmcv                              
13:29:49-137637 DEBUG    Running pip: install --upgrade mmcv                   
13:29:57-141702 DEBUG    Control ControlNet model loading: id="OpenPose XL"    
                         path="thibaud/controlnet-openpose-sdxl-1.0"           
13:29:59-923515 DEBUG    Server: alive=True jobs=1 requests=158 uptime=129     
                         memory=1.86/127.78 backend=Backend.DIFFUSERS          
                         state=idle                                            
13:30:01-224929 DEBUG    Control input: type=PIL.Image input=[<PIL.Image.Image 
                         image mode=RGB size=1000x1618 at 0x254E676A0B0>]      
13:30:05-247283 ERROR    Error running pip: install --upgrade mmcv             
13:30:05-249305 DEBUG    Pip output: Collecting mmcv                           
                           Using cached mmcv-2.2.0.tar.gz (479 kB)             
                           Preparing metadata (setup.py): started              
                           Preparing metadata (setup.py): finished with status 
                         'done'                                                
 ---                                                                            
                           note: This error originates from a subprocess, and  
                         is likely not a problem with pip.                     
                           ERROR: Failed building wheel for mmcv               
                           Running setup.py clean for mmcv                     
                         Failed to build mmcv                                  
                         ERROR: Could not build wheels for mmcv, which is      
                         required to install pyproject.toml-based projects     
13:30:06-064352 ERROR    DWPose: No module named 'mmcv'                        
13:30:06-066348 DEBUG    Control Processor loaded: id="DWPose"                 
                         class=DWposeDetector time=17.26                       
13:30:49-748340 DEBUG    Control ControlNet model loaded: id="OpenPose XL"     
                         path="thibaud/controlnet-openpose-sdxl-1.0" time=52.61
13:31:03-717412 ERROR    Control Processor failed: id="DWPose"                 
                         error='DWposeDetector' object has no attribute        
                         'pose_estimation'                                     
13:31:03-719405 ERROR    Control Processor: AttributeError                     
AttributeError: 'DWposeDetector' object has no attribute 'pose_estimation'

Backend

Diffusers

Branch

Master

Model

SD 1.5

Acknowledgements

  • I have read the above and searched for existing issues
  • I confirm that this is classified correctly and its not an extension issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamFix is required in upstream library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions