lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.17k stars 804 forks source link

[Bug]: Python error during installation #397

Open Euchale opened 8 months ago

Euchale commented 8 months ago

Checklist

What happened?

Unable to install. Getting forge error. See error message below:

Steps to reproduce the problem

  1. Run update.bat
  2. Run run.bat

What should have happened?

WebUI should have installed

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

Unable to generate, cannot go there yet.

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.16v1.8.0rc-latest-238-g437c3489
Commit hash: 437c348926c9ee1bfe1f147529f164bb93f731a1
Launching Web UI with arguments:
Total VRAM 12288 MB, total RAM 32720 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 Ti : native
Hint: your device supports --pin-shared-memory for potential speed improvements.
Hint: your device supports --cuda-malloc for potential speed improvements.
Hint: your device supports --cuda-stream for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  False

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
For effortless bug reporting copy-paste your error into this form: https://docs.google.com/forms/d/e/1FAIpQLScPB8emS3Thkp66nvqwmjTEgxp8Y9ufuWTzFyr9kJ5AoI47dQ/viewform?usp=sf_link
================================================================================
C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cuda_setup\paths.py:27: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('tmp/restart')}
  warn(
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching /usr/local/cuda/lib64...
C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cuda_setup\paths.py:27: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
  warn(
WARNING: No libcudart.so found! Install CUDA or the cudatoolkit package (anaconda)!
CUDA SETUP: Loading binary C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\libbitsandbytes_cpu.so...
Traceback (most recent call last):
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "importlib\__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\transformers\modeling_utils.py", line 85, in <module>
    from accelerate import __version__ as accelerate_version
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\accelerate\__init__.py", line 3, in <module>
    from .accelerator import Accelerator
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\accelerate\accelerator.py", line 35, in <module>
    from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\accelerate\checkpointing.py", line 24, in <module>
    from .utils import (
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\accelerate\utils\__init__.py", line 131, in <module>
    from .bnb import has_4bit_bnb_layers, load_and_quantize_model
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\accelerate\utils\bnb.py", line 42, in <module>
    import bitsandbytes as bnb
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\__init__.py", line 6, in <module>
    from .autograd._functions import (
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\autograd\_functions.py", line 5, in <module>
    import bitsandbytes.functional as F
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\functional.py", line 13, in <module>
    from .cextension import COMPILED_WITH_CUDA, lib
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cextension.py", line 41, in <module>
    lib = CUDALibrary_Singleton.get_instance().lib
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cextension.py", line 37, in get_instance
    cls._instance.initialize()
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\bitsandbytes\cextension.py", line 31, in initialize
    self.lib = ct.cdll.LoadLibrary(binary_path)
  File "ctypes\__init__.py", line 452, in LoadLibrary
  File "ctypes\__init__.py", line 364, in __init__
TypeError: argument of type 'WindowsPath' is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Euchale\AppData\Roaming\SDForge\webui\launch.py", line 51, in <module>
    main()
  File "C:\Users\Euchale\AppData\Roaming\SDForge\webui\launch.py", line 47, in main
    start()
  File "C:\Users\Euchale\AppData\Roaming\SDForge\webui\modules\launch_utils.py", line 541, in start
    import webui
  File "C:\Users\Euchale\AppData\Roaming\SDForge\webui\webui.py", line 19, in <module>
    initialize.imports()
  File "C:\Users\Euchale\AppData\Roaming\SDForge\webui\modules\initialize.py", line 29, in imports
    import pytorch_lightning  # noqa: F401
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\pytorch_lightning\__init__.py", line 35, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\pytorch_lightning\utilities\types.py", line 27, in <module>
    from torchmetrics import Metric
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\torchmetrics\__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\torchmetrics\functional\__init__.py", line 121, in <module>
    from torchmetrics.functional.text._deprecated import _bleu_score as bleu_score
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\torchmetrics\functional\text\__init__.py", line 31, in <module>
    from torchmetrics.functional.text.bert import bert_score
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\torchmetrics\functional\text\bert.py", line 25, in <module>
    from torchmetrics.functional.text.helper_embedding_metric import (
  File "C:\Users\Euchale\AppData\Roaming\Python\Python310\site-packages\torchmetrics\functional\text\helper_embedding_metric.py", line 27, in <module>
    from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Euchale\AppData\Roaming\SDForge\system\python\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):
argument of type 'WindowsPath' is not iterable
Press any key to continue . . .

Additional information

I have successfully installed quite a few webuis before (Auto1111, Oogabooga) so not sure why this one isn't working. I have moved the installation from my D: drive to %appdata% to make sure its not a permissions issue.

FanatSors commented 8 months ago

exactly same issue. Do you use old version of win10 by any chance?

ejiwarp commented 8 months ago

I have same problem and I use Win10, but I can proceed with adding "--xformers", not sure what happened

Euchale commented 8 months ago

exactly same issue. Do you use old version of win10 by any chance?

I am using have Win 10, but its fully up to date.

I have same problem and I use Win10, but I can proceed with adding "--xformers", not sure what happened

Where are you putting --xformers?

ejiwarp commented 8 months ago

Where are you putting --xformers?

sd_webui_forge\webui\webui-user.bat "set COMMANDLINE_ARGS=--xformers"

Euchale commented 8 months ago

Ahh I see, I figured it would be either, run/update or enviroment.bat. I´m Patching now, will report back once its done if that fixed the issue.

Can confirm, that fixed it.

allline commented 7 months ago

什么时候能完美支持froge呢