InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

Can't install ControlNet canny with URL manually pasted in invokeai-configure

Open theRolento opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

No response

What version did you experience this issue on?

3.1

What happened?

Pasting the URL for canny ControlNet in the field under "ControlNet" after running again invokeai-configure i'll get this error:

[2023-09-09 12:55:03,296]::[InvokeAI]::INFO --> Scanned 6 files and directories, imported 0 models
[2023-09-09 12:55:03,311]::[InvokeAI]::INFO --> Installing https://huggingface.co/diffusers/diffusers/controlnet-canny-sdxl-1.0 [1/1]
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\PuPpEt\invokeai\.venv\Scripts\invokeai-configure.exe\__main__.py", line 7, in <module>
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\backend\install\invokeai_configure.py", line 945, in main
    process_and_execute(opt, models_to_download)
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\frontend\install\model_install.py", line 665, in process_and_execute
    installer.install(selections)
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\backend\install\model_install_backend.py", line 210, in install
    self.heuristic_import(path)
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\backend\install\model_install_backend.py", line 259, in heuristic_import
    models_installed.update({str(model_path_id_or_url): self._install_url(model_path_id_or_url)})
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\backend\install\model_install_backend.py", line 286, in _install_url
    location = download_with_resume(url, Path(staging))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PuPpEt\invokeai\InvokeAI\invokeai\backend\util\util.py", line 290, in download_with_resume
    file_name = re.search('filename="(.+)"', resp.headers.get("Content-Disposition")).group(1)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PuPpEt\AppData\Local\Programs\Python\Python311\Lib\re\__init__.py", line 176, in search
    return _compile(pattern, flags).search(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Screenshots

No response

Additional context

No response

Contact Details

No response

theRolento avatar Sep 09 '23 10:09 theRolento

That url doesn't seem right - it should be: https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0

It might be easier to use the model manager in the Web UI

Millu avatar Sep 10 '23 06:09 Millu

Yeah you're right, there's a duplicate /diffusers in the URL, my bad.

theRolento avatar Sep 10 '23 09:09 theRolento