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

Run Error,Error loading script,ImportError: cannot import name #504

Open
lyl3chen opened this issue May 2, 2024 · 3 comments
Open

Run Error,Error loading script,ImportError: cannot import name #504

lyl3chen opened this issue May 2, 2024 · 3 comments

Comments

@lyl3chen
Copy link

lyl3chen commented May 2, 2024

What happened?

"Run" reports an error. How to solve it?

Colab cell output

/content
Mounted at /content/drive
env: PYTHONDONTWRITEBYTECODE=1
env: TF_CPP_MIN_LOG_LEVEL=1
45 packages can be upgraded. Run 'apt list --upgradable' to see them.
--2024-05-02 19:54:34--  https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/669786276/620e2e64-be9f-4599-904f-18ee3811e159?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240502%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240502T195435Z&X-Amz-Expires=300&X-Amz-Signature=b157a7e270e04699386dcd7719f7430a28f1864bc6a4455dd5a31a70db9fa22f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=669786276&response-content-disposition=attachment%3B%20filename%3Dlibtcmalloc_minimal.so.4&response-content-type=application%2Foctet-stream [following]
--2024-05-02 19:54:35--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/669786276/620e2e64-be9f-4599-904f-18ee3811e159?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240502%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240502T195435Z&X-Amz-Expires=300&X-Amz-Signature=b157a7e270e04699386dcd7719f7430a28f1864bc6a4455dd5a31a70db9fa22f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=669786276&response-content-disposition=attachment%3B%20filename%3Dlibtcmalloc_minimal.so.4&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 373960 (365K) [application/octet-stream]
Saving to: ‘/content/libtcmalloc_minimal.so.4’

/content/libtcmallo 100%[===================>] 365.20K  --.-KB/s    in 0.02s   

2024-05-02 19:54:35 (17.4 MB/s) - ‘/content/libtcmalloc_minimal.so.4’ saved [373960/373960]

env: LD_PRELOAD=/content/libtcmalloc_minimal.so.4
pkg-config is already the newest version (0.29.2-1ubuntu3).
python3-dev is already the newest version (3.10.6-1~22.04).
python3-dev set to manually installed.
The following additional packages will be installed:
  libaria2-0 libblkid-dev libblkid1 libc-ares2 libcairo-script-interpreter2 libffi-dev
  libglib2.0-dev libglib2.0-dev-bin libice-dev liblzo2-2 libmount-dev libmount1 libpixman-1-dev
  libselinux1-dev libsepol-dev libsm-dev libxcb-render0-dev libxcb-shm0-dev
Suggested packages:
  libcairo2-doc libgirepository1.0-dev libglib2.0-doc libgdk-pixbuf2.0-bin | libgdk-pixbuf2.0-dev
  libxml2-utils libice-doc cryptsetup-bin libsm-doc
The following NEW packages will be installed:
  aria2 libaria2-0 libblkid-dev libc-ares2 libcairo-script-interpreter2 libcairo2-dev libffi-dev
  libglib2.0-dev libglib2.0-dev-bin libice-dev liblzo2-2 libmount-dev libpixman-1-dev
  libselinux1-dev libsepol-dev libsm-dev libxcb-render0-dev libxcb-shm0-dev
The following packages will be upgraded:
  libblkid1 libmount1
2 upgraded, 18 newly installed, 0 to remove and 43 not upgraded.
Need to get 5,577 kB of archives.
After this operation, 25.2 MB of additional disk space will be used.
(Reading database ... 121920 files and directories currently installed.)
Preparing to unpack .../libblkid1_2.37.2-4ubuntu3.4_amd64.deb ...
Unpacking libblkid1:amd64 (2.37.2-4ubuntu3.4) over (2.37.2-4ubuntu3) ...
Setting up libblkid1:amd64 (2.37.2-4ubuntu3.4) ...
(Reading database ... 121920 files and directories currently installed.)
Preparing to unpack .../libmount1_2.37.2-4ubuntu3.4_amd64.deb ...
Unpacking libmount1:amd64 (2.37.2-4ubuntu3.4) over (2.37.2-4ubuntu3) ...
Setting up libmount1:amd64 (2.37.2-4ubuntu3.4) ...
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 121920 files and directories currently installed.)
Preparing to unpack .../00-libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ...
Unpacking libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ...
Selecting previously unselected package libaria2-0:amd64.
Preparing to unpack .../01-libaria2-0_1.36.0-1_amd64.deb ...
Unpacking libaria2-0:amd64 (1.36.0-1) ...
Selecting previously unselected package aria2.
Preparing to unpack .../02-aria2_1.36.0-1_amd64.deb ...
Unpacking aria2 (1.36.0-1) ...
Selecting previously unselected package liblzo2-2:amd64.
Preparing to unpack .../03-liblzo2-2_2.10-2build3_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.10-2build3) ...
Selecting previously unselected package libcairo-script-interpreter2:amd64.
Preparing to unpack .../04-libcairo-script-interpreter2_1.16.0-5ubuntu2_amd64.deb ...
Unpacking libcairo-script-interpreter2:amd64 (1.16.0-5ubuntu2) ...
Selecting previously unselected package libice-dev:amd64.
Preparing to unpack .../05-libice-dev_2%3a1.0.10-1build2_amd64.deb ...
Unpacking libice-dev:amd64 (2:1.0.10-1build2) ...
Selecting previously unselected package libsm-dev:amd64.
Preparing to unpack .../06-libsm-dev_2%3a1.2.3-1build2_amd64.deb ...
Unpacking libsm-dev:amd64 (2:1.2.3-1build2) ...
Selecting previously unselected package libpixman-1-dev:amd64.
Preparing to unpack .../07-libpixman-1-dev_0.40.0-1ubuntu0.22.04.1_amd64.deb ...
Unpacking libpixman-1-dev:amd64 (0.40.0-1ubuntu0.22.04.1) ...
Selecting previously unselected package libxcb-render0-dev:amd64.
Preparing to unpack .../08-libxcb-render0-dev_1.14-3ubuntu3_amd64.deb ...
Unpacking libxcb-render0-dev:amd64 (1.14-3ubuntu3) ...
Selecting previously unselected package libxcb-shm0-dev:amd64.
Preparing to unpack .../09-libxcb-shm0-dev_1.14-3ubuntu3_amd64.deb ...
Unpacking libxcb-shm0-dev:amd64 (1.14-3ubuntu3) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../10-libffi-dev_3.4.2-4_amd64.deb ...
Unpacking libffi-dev:amd64 (3.4.2-4) ...
Selecting previously unselected package libglib2.0-dev-bin.
Preparing to unpack .../11-libglib2.0-dev-bin_2.72.4-0ubuntu2.2_amd64.deb ...
Unpacking libglib2.0-dev-bin (2.72.4-0ubuntu2.2) ...
Selecting previously unselected package libblkid-dev:amd64.
Preparing to unpack .../12-libblkid-dev_2.37.2-4ubuntu3.4_amd64.deb ...
Unpacking libblkid-dev:amd64 (2.37.2-4ubuntu3.4) ...
Selecting previously unselected package libsepol-dev:amd64.
Preparing to unpack .../13-libsepol-dev_3.3-1build1_amd64.deb ...
Unpacking libsepol-dev:amd64 (3.3-1build1) ...
Selecting previously unselected package libselinux1-dev:amd64.
Preparing to unpack .../14-libselinux1-dev_3.3-1build2_amd64.deb ...
Unpacking libselinux1-dev:amd64 (3.3-1build2) ...
Selecting previously unselected package libmount-dev:amd64.
Preparing to unpack .../15-libmount-dev_2.37.2-4ubuntu3.4_amd64.deb ...
Unpacking libmount-dev:amd64 (2.37.2-4ubuntu3.4) ...
Selecting previously unselected package libglib2.0-dev:amd64.
Preparing to unpack .../16-libglib2.0-dev_2.72.4-0ubuntu2.2_amd64.deb ...
Unpacking libglib2.0-dev:amd64 (2.72.4-0ubuntu2.2) ...
Selecting previously unselected package libcairo2-dev:amd64.
Preparing to unpack .../17-libcairo2-dev_1.16.0-5ubuntu2_amd64.deb ...
Unpacking libcairo2-dev:amd64 (1.16.0-5ubuntu2) ...
Setting up libglib2.0-dev-bin (2.72.4-0ubuntu2.2) ...
Setting up libblkid-dev:amd64 (2.37.2-4ubuntu3.4) ...
Setting up libpixman-1-dev:amd64 (0.40.0-1ubuntu0.22.04.1) ...
Setting up libice-dev:amd64 (2:1.0.10-1build2) ...
Setting up libsm-dev:amd64 (2:1.2.3-1build2) ...
Setting up liblzo2-2:amd64 (2.10-2build3) ...
Setting up libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ...
Setting up libffi-dev:amd64 (3.4.2-4) ...
Setting up libxcb-shm0-dev:amd64 (1.14-3ubuntu3) ...
Setting up libsepol-dev:amd64 (3.3-1build1) ...
Setting up libxcb-render0-dev:amd64 (1.14-3ubuntu3) ...
Setting up libcairo-script-interpreter2:amd64 (1.16.0-5ubuntu2) ...
Setting up libaria2-0:amd64 (1.36.0-1) ...
Setting up libselinux1-dev:amd64 (3.3-1build2) ...
Setting up aria2 (1.36.0-1) ...
Setting up libmount-dev:amd64 (2.37.2-4ubuntu3.4) ...
Setting up libglib2.0-dev:amd64 (2.72.4-0ubuntu2.2) ...
Processing triggers for libglib2.0-0:amd64 (2.72.4-0ubuntu2.2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link

Processing triggers for man-db (2.10.2-1) ...
Setting up libcairo2-dev:amd64 (1.16.0-5ubuntu2) ...
The following NEW packages will be installed:
  unionfs-fuse
0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.
Need to get 48.7 kB of archives.
After this operation, 146 kB of additional disk space will be used.
Selecting previously unselected package unionfs-fuse.
(Reading database ... 122767 files and directories currently installed.)
Preparing to unpack .../unionfs-fuse_1.0-1ubuntu2_amd64.deb ...
Unpacking unionfs-fuse (1.0-1ubuntu2) ...
Setting up unionfs-fuse (1.0-1ubuntu2) ...
Processing triggers for man-db (2.10.2-1) ...
Collecting httpx==0.24.1
  Downloading httpx-0.24.1-py3-none-any.whl (75 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.4/75.4 kB 2.6 MB/s eta 0:00:00
Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (2024.2.2)
Collecting httpcore<0.18.0,>=0.15.0 (from httpx==0.24.1)
  Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.5/74.5 kB 6.6 MB/s eta 0:00:00
Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (3.7)
Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx==0.24.1) (1.3.1)
Collecting h11<0.15,>=0.13 (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1)
  Downloading h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 7.7 MB/s eta 0:00:00
Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (3.7.1)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx==0.24.1) (1.2.1)
Installing collected packages: h11, httpcore, httpx
Successfully installed h11-0.14.0 httpcore-0.17.3 httpx-0.24.1
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 2.3/2.3 GB 116.0 MB/s eta 0:00:01tcmalloc: large alloc 2267275264 bytes == 0x5769ac4d8000 @ 
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 2.3/2.3 GB 125.2 MB/s eta 0:00:01tcmalloc: large alloc 2834096128 bytes == 0x576a33716000 @ 
tcmalloc: large alloc 2267275264 bytes == 0x5769ac4d8000 @ 
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 GB 658.9 kB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 57.0 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 53.9 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 39.0 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 56.2 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 519.2/519.2 kB 6.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 9.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.4/96.4 kB 6.8 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.2/108.2 MB 9.3 MB/s eta 0:00:00
/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui
Updating files: 100% (203/203), done.
HEAD is now at 22bcc7be attempted fix for infinite loading for settings that some people experience
Updating files: 100% (135/135), done.
HEAD is now at cf1d67a Update modelcard.md
HEAD is now at c202932 GRADIO_TUNNEL online
Already up to date.

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
55cddc|OK  |       0B/s|/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/models/CLIP/ViT-L-14.pt

Status Legend:
(OK):download completed.
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing gfpgan
Installing clip
Installing open_clip
Installing requirements for CodeFormer
Installing requirements for Web UI

Installing sd-webui-controlnet requirement: fvcore
Installing sd-webui-controlnet requirement: mediapipe
Installing sd-webui-controlnet requirement: svglib
Installing sd-webui-controlnet requirement: changing albumentations version from 1.3.1 to 1.4.3
Installing sd-webui-controlnet requirement: onnxruntime-gpu
ControlNet init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.
Installing sd-webui-controlnet requirement: handrefinerportable
Installing sd-webui-controlnet requirement: depth_anything
Installing sd-webui-controlnet requirement: dsine


Installing Deforum requirement: av
Installing Deforum requirement: pims

Installing requirements for CivitAI Browser


Installing pycloudflared


Launching Web UI with arguments: --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --clip-models-path /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/models/CLIP --ckpt-dir /content/fused-models --lora-dir /content/fused-lora --multiple
2024-05-02 20:01:52.500722: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-02 20:01:52.500780: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-02 20:01:52.612029: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-05-02 20:01:55.092900: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
/usr/local/lib/python3.10/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
  warnings.warn(
Try to fallback to basicsr with older modules
Try to fallback to basicsr with older modules
Try to fallback to basicsr with older modules
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Error loading script: api.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/api.py", line 17, in <module>
    from scripts import external_code, global_state
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 1, in <module>
    from internal_controlnet.external_code import *  # noqa: F403
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 12, in <module>
    from scripts import global_state
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 9, in <module>
    from scripts.supported_preprocessor import Preprocessor
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Error loading script: batch_hijack.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 6, in <module>
    from scripts import external_code
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 1, in <module>
    from internal_controlnet.external_code import *  # noqa: F403
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 12, in <module>
    from scripts import global_state
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 9, in <module>
    from scripts.supported_preprocessor import Preprocessor
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Error loading script: controlnet.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 17, in <module>
    import scripts.preprocessor as preprocessor_init  # noqa
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/__init__.py", line 1, in <module>
    from .inpaint import *
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/inpaint.py", line 3, in <module>
    from ..supported_preprocessor import Preprocessor, PreprocessorParameter
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

2024-05-02 20:02:45,507 - ControlNet - INFO - ControlNet v1.1.446
Error loading script: external_code.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 1, in <module>
    from internal_controlnet.external_code import *  # noqa: F403
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 12, in <module>
    from scripts import global_state
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 9, in <module>
    from scripts.supported_preprocessor import Preprocessor
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Error loading script: global_state.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 9, in <module>
    from scripts.supported_preprocessor import Preprocessor
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Warning: ControlNet failed to load SGM - will use LDM instead.
Error loading script: infotext.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/infotext.py", line 7, in <module>
    from scripts import external_code
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 1, in <module>
    from internal_controlnet.external_code import *  # noqa: F403
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 12, in <module>
    from scripts import global_state
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 9, in <module>
    from scripts.supported_preprocessor import Preprocessor
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Error loading script: supported_preprocessor.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 9, in <module>
    from scripts.utils import ndarray_lru_cache
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

Error loading script: utils.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 13, in <module>
    from modules.modelloader import load_file_from_url  # noqa: F401
ImportError: cannot import name 'load_file_from_url' from 'modules.modelloader' (/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/modelloader.py)

all detected, remote.moe trying to connect...
Warning: Permanently added 'localhost.run' (RSA) to the list of known hosts.
all detected, cloudflared trying to connect...
Download cloudflared...: 100% 34.8M/34.8M [00:00<00:00, 246MB/s]
Loading weights [cc6cb27103] from /content/fused-models/v1-5-pruned-emaonly.ckpt
Creating model from config: /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
vocab.json: 100% 961k/961k [00:00<00:00, 4.90MB/s]
merges.txt: 100% 525k/525k [00:00<00:00, 4.06MB/s]
special_tokens_map.json: 100% 389/389 [00:00<00:00, 2.13MB/s]
tokenizer_config.json: 100% 905/905 [00:00<00:00, 5.49MB/s]
config.json: 100% 4.52k/4.52k [00:00<00:00, 20.6MB/s]
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(9): ng_deepnegative_v1_75t, verybadimagenegative_v1.3, EasyNegative, bad-image-v2-39000, bad_prompt_version2, bad-artist, bad-hands-5, EasyNegativeV2, bad-artist-anime
Model loaded in 137.5s (load weights from disk: 120.6s, create model: 5.9s, apply weights to model: 1.1s, load textual inversion embeddings: 9.8s).
Error executing callback ui_tabs_callback for /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_callbacks.py", line 125, in ui_tabs_callback
    res += c.callback() or []
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/ui_right.py", line 41, in on_ui_tabs
    components = setup_deforum_left_side_ui()
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/ui_left.py", line 46, in setup_deforum_left_side_ui
    tab_run_params = get_tab_run(d, da)  # Run tab
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/ui_elements.py", line 48, in get_tab_run
    sampler = create_gr_elem(d.sampler)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/ui_elements.py", line 38, in create_gr_elem
    return obj_type(**params)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 1306, in __init__
    self.test_input = self.choices[0] if len(self.choices) else None
TypeError: 'dict_values' object is not subscriptable

Which colab and model(s) were you using when the error occurred?

https://github.com/camenduru/stable-diffusion-webui-colab/tree/drive

Which Public WebUI Colab URL were you using when the error occurred?

remote.moe

If you used HiRes mode when the error occurred, please provide the Hires info

No response

@lyl3chen
Copy link
Author

lyl3chen commented May 2, 2024

Please help me

@steinhaug
Copy link

steinhaug commented May 4, 2024

I get errors aswell, probably same probelm.

Launching Web UI with arguments: --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple 2024-05-04 14:01:20.347239: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-05-04 14:01:20.347295: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-05-04 14:01:20.481366: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-05-04 14:01:23.023248: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/stable-diffusion-webui/launch.py", line 40, in <module> main() File "/content/stable-diffusion-webui/launch.py", line 36, in main start() File "/content/stable-diffusion-webui/modules/launch_utils.py", line 340, in start import webui File "/content/stable-diffusion-webui/webui.py", line 35, in <module> import gradio File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 55, in <module> from gradio import processing_utils, utils File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 339, in <module> class AsyncRequest: File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 358, in AsyncRequest client = httpx.AsyncClient() File "/usr/local/lib/python3.10/dist-packages/httpx/_client.py", line 1397, in __init__ self._transport = self._init_transport( File "/usr/local/lib/python3.10/dist-packages/httpx/_client.py", line 1445, in _init_transport return AsyncHTTPTransport( File "/usr/local/lib/python3.10/dist-packages/httpx/_transports/default.py", line 275, in __init__ self._pool = httpcore.AsyncConnectionPool( TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'

@accelerationa
Copy link

I am getting this error too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants