InvokeAI: [bug]: Launching web-gui with CUDA

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

2060

GPU VRAM

8Gb

Version number

3.7.0

Browser

Opera: 107.0.5045.37

Python dependencies

No response

What happened

After completing the installation, I proceeded to execute invoke.bat, selected option 1, confirmed it, and encountered an error. I attempted reinstall through the invoke.bat, then retried launching the GUI and encountered the same errors.

Starting the InvokeAI browser-based UI..
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "D:\ai_programs\invoke\.venv\Scripts\invokeai-web.exe\__main__.py", line 4, in <module>
    from invokeai.app.api_app import invoke_api
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\api_app.py", line 43, in <module>
    from .api.dependencies import ApiDependencies
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\api\dependencies.py", line 12, in <module>
    from ..services.board_images.board_images_default import BoardImagesService
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\services\board_images\board_images_default.py", line 3, in <module>
    from invokeai.app.services.invoker import Invoker
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\services\invoker.py", line 9, in <module>
    from .shared.graph import Graph, GraphExecutionState
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\services\shared\graph.py", line 12, in <module>
    from invokeai.app.invocations import *  # noqa: F401 F403
  File "D:\ai_programs\invoke\.venv\lib\site-packages\invokeai\app\invocations\controlnet_image_processors.py", line 9, in <module>
    from controlnet_aux import (
ModuleNotFoundError: No module named 'controlnet_aux'

What you expected to happen

I expected to launch web GUI

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 15

Most upvoted comments

@adriantiron - yes, thanks for adding in the details! I’d have been more explicit, but was writing from memory on a different computer without the installation handy.

@the-space-fish Thanks a bunch for the fix, that’s exactly what the problem was! I just wanted to add a few details, as some might still struggle with this information. What I did was download the controlnet_aux-0.0.7.tar.gz file from the pypi page and extract ONLY the controlnet_aux folder from the src folder and place it in ...\InvokeAI\.venv\Lib\site-packages. The name of the folder is important, it has to be controlnet_aux, otherwise python doesn’t know where to import from.

Sorry if this is simple stuff, I thought it might still be helpful.

I had the same issue last week upon updating to 3.7 from 3.4 with the latest install.bat (I’d put off updating for a while for fear of just such a thing happening after I ran into some of the now-known issues when updating to 3.4!), and saw some older issues posted for it as well (such as #5734 , which was closed with a suggested fix, but no confirmation).

I tried doing an update to force dependency reinstallation, tried running the repair installation option, tried reinstalling again from the 3.7 install script, but didn’t have any luck. I tried manually uninstalling and re-installing the controlnet_aux module, and still got that error. The module showed up in a “pip list” in the VENV, so I was about ready to pull my hair out in flabbergastery.

Finally, I noticed that in the relevant site-packages directory, that regardless of whether I installed it individually or by the script, controlnet_aux was only ever creating the dist-info folder, and not the actual module contents (which explains why it could show up as installed without actually being there). So at that point I just manually downloaded the package (you can grab the current version here: https://pypi.org/project/controlnet-aux/0.0.7/ ) and extracted the module contents folder straight over into the site-packages directory, and that took care of the problem.

I’m not versed enough in Python to figure out exactly what was going on here, but it seems like there’s some flakiness to this package that might warrant a little extra guarding against.