Module Not Found Error
I'm encountering an issue with "Colab(pro)-AUTOMATIC1111" and have exhausted all troubleshooting steps I can think of. Perhaps someone can provide assistance.
I have the Colab notebook stored on my Google Drive, which runs without any problems until I add the following extensions: sd-civitai-browser-plus, sd-webui-inpaint-anything, and sd-webui-segment-anything. ControlNet is installed with this Colab. After installing sd-civitai-browser-plus, it works fine initially, but when I reopen the session (usually the next day), it fails with the following error:
<<<---
*** Error loading script: civitai_api.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-civitai-browser-plus/scripts/civitai_api.py", line 17, in <module>
from fake_useragent import UserAgent
ModuleNotFoundError: No module named 'fake_useragent'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 382, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, 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/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-civitai-browser-plus/scripts/civitai_api.py", line 15, in <module>
import scripts.civitai_download as _download
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-civitai-browser-plus/scripts/civitai_download.py", line 16, in <module>
import scripts.civitai_api as _api
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-civitai-browser-plus/scripts/civitai_api.py", line 19, in <module>
print(f"{gl.print} Python module 'fake_useragent' has not been imported correctly, please try to restart or install it manually.")
AttributeError: module 'scripts.civitai_global' has no attribute 'print'
---
CivitAI Browser+: Python module 'ZipUnicode' has not been imported correctly, please try to restart or install it manually.
CivitAI Browser+: Python module 'fake_useragent' has not been imported correctly, please try to restart or install it manually.
CivitAI Browser+: Aria2 RPC restarted
CivitAI Browser+: Python module 'fake_useragent' has not been imported correctly, please try to restart or install it manually.
CivitAI Browser+: Python module 'ZipUnicode' has not been imported correctly, please try to restart or install it manually.
CivitAI Browser+: Python module 'fake_useragent' has not been imported correctly, please try to restart or install it manually.
CivitAI Browser+: Aria2 RPC restarted
2023-12-03 14:42:18,864 - ControlNet - INFO - ControlNet v1.1.419
ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-12-03 14:42:19,407 - ControlNet - INFO - ControlNet v1.1.419
*** Error loading script: inpaint_anything.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 382, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, 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/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-inpaint-anything/scripts/inpaint_anything.py", line 20, in <module>
from lama_cleaner.model_manager import ModelManager
ModuleNotFoundError: No module named 'lama_cleaner'
---
Loading weights [6ce0161689] from /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inference.yaml
Running on public URL: https://d0b3fb5444dcfbe039.gradio.live
✔ Connected
Startup time: 132.1s (import torch: 7.4s, import gradio: 1.1s, setup paths: 1.4s, initialize shared: 0.2s, other imports: 1.0s, load scripts: 16.6s, load upscalers: 1.5s, reload hypernetworks: 1.9s, initialize extra networks: 16.1s, create ui: 79.7s, gradio launch: 4.8s, add APIs: 0.1s).
Applying attention optimization: xformers... done.
Model loaded in 117.6s (load weights from disk: 76.4s, create model: 10.3s, apply weights to model: 26.9s, load VAE: 0.7s, calculate empty prompt: 3.2s).
--->>>
I've attempted various solutions, including restarting at different points in the Colab and reinstalling the extensions, but the issue persists. I'm now unsure of what steps to take next and hope someone can provide assistance.
Thank you for your help.
cheers, Tom