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

[Bug]: No module named 'basicsr' on clean A1111 1.8.0 installation #954

Closed
3 tasks done
viking1304 opened this issue Mar 6, 2024 · 1 comment
Closed
3 tasks done
Labels
bug Something isn't working wrong format

Comments

@viking1304
Copy link
Contributor

viking1304 commented Mar 6, 2024

Have you read the latest version of the FAQ?

  • I have visited the FAQ page right now and my issue is not present there

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Are you using the latest version of the Deforum extension?

  • I have Deforum updated to the lastest version and I still have the issue.

What happened?

basicsr module has been removed from a1111 since 1.8.0, but deforum still require that module. It is very easy to overlook this if you already had a1111 installed before since you already have basics installed.

Steps to reproduce the problem

  1. Install 1.8.0 in new folder with new venv
  2. Install controlnet and deforum
  3. Click Apply and restart UI
  4. UI will throw an error message ModuleNotFoundError: No module named 'basicsr' on startup

What should have happened/how would you fix it?

I already submitted a PR to fix this.

Torch version

torch: 2.2.1

On which platform are you launching the webui with the extension?

Local PC setup (Mac)

Deforum settings

defult

Webui core settings

defult

Console logs

❯ ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on viking user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.13 (main, Aug 24 2023, 12:59:26) [Clang 15.0.0 (clang-1500.1.0.2.5)]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
ControlNet init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.
Launching Web UI with arguments: --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
==============================================================================
You are running torch 2.1.0.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
*** Error loading script: deforum.py
    Traceback (most recent call last):
      File "/Users/viking/test/modules/scripts.py", line 527, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/Users/viking/test/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 "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum.py", line 41, in <module>
        init_deforum()
      File "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum.py", line 33, in init_deforum
        from deforum_helpers.ui_right import on_ui_tabs
      File "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/ui_right.py", line 17, in <module>
        from .args import DeforumOutputArgs, get_component_names, get_settings_component_names
      File "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/args.py", line 26, in <module>
        from .deforum_controlnet import controlnet_component_names
      File "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/deforum_controlnet.py", line 29, in <module>
        from .general_utils import count_files_in_folder, clean_gradio_path_strings  # TODO: do it another way
      File "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/general_utils.py", line 21, in <module>
        from basicsr.utils.download_util import load_file_from_url
    ModuleNotFoundError: No module named 'basicsr'

---
*** Error loading script: deforum_api.py
    Traceback (most recent call last):
      File "/Users/viking/test/modules/scripts.py", line 527, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/Users/viking/test/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 "/Users/viking/test/extensions/deforum-for-automatic1111-webui/scripts/deforum_api.py", line 29, in <module>
        from deforum_api_models import Batch, DeforumJobErrorType, DeforumJobStatusCategory, DeforumJobPhase, DeforumJobStatus
    ModuleNotFoundError: No module named 'deforum_api_models'

---
ControlNet preprocessor location: /Users/viking/test/extensions/sd-webui-controlnet/annotator/downloads
2024-03-06 12:06:41,249 - ControlNet - INFO - ControlNet v1.1.441
2024-03-06 12:06:41,291 - ControlNet - INFO - ControlNet v1.1.441
Loading weights [6ce0161689] from /Users/viking/test/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Creating model from config: /Users/viking/test/configs/v1-inference.yaml
2024-03-06 12:06:41,473 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 3.9s (prepare environment: 0.2s, import torch: 1.4s, import gradio: 0.4s, setup paths: 0.5s, other imports: 0.4s, load scripts: 0.3s, create ui: 0.3s, gradio launch: 0.2s).
Applying attention optimization: sub-quadratic... done.
Model loaded in 4.0s (create model: 0.7s, apply weights to model: 2.8s, apply half(): 0.2s, calculate empty prompt: 0.1s).

Additional information

A1111 1.8.0 uses load_file_from_url from modules.modelloader instead of basicsr, and that elminates the need for basicsr. I just did the same for deforum extension.

@viking1304 viking1304 added the bug Something isn't working label Mar 6, 2024
@github-actions github-actions bot closed this as completed Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

This issue has been closed due to incorrect formatting. Please address the following mistakes and reopen the issue (click on the 'Reopen' button below):

  • Include THE FULL LOG FROM THE START OF THE WEBUI in the issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wrong format
Projects
None yet
Development

No branches or pull requests

1 participant