lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.3k stars 705 forks source link

CUDA setup failed #1016

Open shalim2904 opened 1 month ago

shalim2904 commented 1 month ago

issue after update Python 3.10.11 (main, May 7 2023, 19:26:31) [Clang 16.0.3 ] Version: f2.0.1v1.10.1-previous-247-g9f6d263c Commit hash: 9f6d263c3f3e07f2e7874263d36b528b887b3b26 /home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/extensions-builtin/forge_legacy_preprocessors/install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Legacy Preprocessor init warning: Unable to install insightface automatically. Please try run pip install insightface manually. /home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/extensions-builtin/sd_forge_controlnet/install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Launching Web UI with arguments: --pin-shared-memory --cuda-malloc --cuda-stream --gradio-allowed-path /home/suryahalim/SD/Data/Images Using cudaMallocAsync backend. Total VRAM 7943 MB, total RAM 31698 MB pytorch version: 2.1.2+cu121 Set vram state to: NORMAL_VRAM Always pin shared GPU memory Device: cuda:0 NVIDIA GeForce RTX 4060 Laptop GPU : cudaMallocAsync VAE dtype preferences: [torch.bfloat16, torch.float32] -> torch.bfloat16 CUDA Using Stream: True ERROR:bitsandbytes.cextension:Could not load bitsandbytes native library: libcusparse.so.12: cannot open shared object file: No such file or directory Traceback (most recent call last): File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 109, in lib = get_native_library() File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 96, in get_native_library dll = ct.cdll.LoadLibrary(str(binary_path)) File "/home/suryahalim/SD/Data/Assets/Python310/lib/python3.10/ctypes/init.py", line 452, in LoadLibrary return self._dlltype(name) File "/home/suryahalim/SD/Data/Assets/Python310/lib/python3.10/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: libcusparse.so.12: cannot open shared object file: No such file or directory WARNING:bitsandbytes.cextension: CUDA Setup failed despite CUDA being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

Traceback (most recent call last): File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 808, in _get_module return importlib.import_module("." + module_name, self.name) File "/home/suryahalim/SD/Data/Assets/Python310/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/models/autoencoders/init.py", line 1, in from .autoencoder_asym_kl import AsymmetricAutoencoderKL File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/models/autoencoders/autoencoder_asym_kl.py", line 20, in from ...utils.accelerate_utils import apply_forward_hook File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/accelerate_utils.py", line 24, in import accelerate File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/accelerate/init.py", line 3, in from .accelerator import Accelerator File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/accelerate/accelerator.py", line 35, in from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/accelerate/checkpointing.py", line 24, in from .utils import ( File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/accelerate/utils/init.py", line 131, in from .bnb import has_4bit_bnb_layers, load_and_quantize_model File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/accelerate/utils/bnb.py", line 42, in import bitsandbytes as bnb File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/init.py", line 15, in from .nn import modules File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/nn/init.py", line 17, in from .triton_based_modules import ( File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/nn/triton_based_modules.py", line 6, in from bitsandbytes.triton.dequantize_rowwise import dequantize_rowwise File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/bitsandbytes/triton/dequantize_rowwise.py", line 12, in import triton File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/init.py", line 20, in from .compiler import compile, CompilationError File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/compiler/init.py", line 1, in from .compiler import CompiledKernel, compile, instance_descriptor File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/compiler/compiler.py", line 27, in from .code_generator import ast_to_ttir File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/compiler/code_generator.py", line 8, in from .. import language File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/language/init.py", line 4, in from . import math File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/language/math.py", line 4, in from . import core File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/language/core.py", line 1376, in def minimum(x, y): File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 542, in jit return decorator(fn) File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 534, in decorator return JITFunction( File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 433, in init self.run = self._make_launcher() File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 388, in _make_launcher scope = {"version_key": version_key(), File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 120, in version_key ptxas = path_to_ptxas()[0] File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/triton/common/backend.py", line 119, in path_to_ptxas raise RuntimeError("Cannot find ptxas") RuntimeError: Cannot find ptxas

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

Traceback (most recent call last): File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 808, in _get_module return importlib.import_module("." + module_name, self.name) File "/home/suryahalim/SD/Data/Assets/Python310/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 44, in from ..models import AutoencoderKL File "", line 1075, in _handle_fromlist File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 798, in getattr module = self._get_module(self._class_to_module[name]) File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 810, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.models.autoencoders.autoencoder_kl because of the following error (look up to see its traceback): Cannot find ptxas

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

Traceback (most recent call last): File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/launch.py", line 51, in main() File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/launch.py", line 47, in main start() File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/launch_utils.py", line 546, in start import webui File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/webui.py", line 21, in initialize.imports() File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/initialize.py", line 32, in imports from modules import processing, gradio_extensions, ui # noqa: F401 File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/processing.py", line 19, in from modules import devices, prompt_parser, masking, sd_samplers, lowvram, infotext_utils, extra_networks, sd_vae_approx, scripts, sd_samplers_common, sd_unet, errors, rng, profiling File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/sd_samplers.py", line 5, in from modules import sd_samplers_kdiffusion, sd_samplers_timesteps, sd_samplers_lcm, shared, sd_samplers_common, sd_schedulers File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/sd_samplers_kdiffusion.py", line 5, in from modules import sd_samplers_common, sd_samplers_extra, sd_samplers_cfg_denoiser, sd_schedulers, devices File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/sd_samplers_common.py", line 6, in from modules import devices, images, sd_vae_approx, sd_samplers, sd_vae_taesd, shared, sd_models File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/modules/sd_models.py", line 21, in from backend.loader import forge_loader File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/backend/loader.py", line 9, in from diffusers import DiffusionPipeline File "", line 1075, in _handle_fromlist File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 799, in getattr value = getattr(module, name) File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 798, in getattr module = self._get_module(self._class_to_module[name]) File "/home/suryahalim/SD/Data/Packages/Stable Diffusion WebUI Forge/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 810, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.pipeline_utils because of the following error (look up to see its traceback): Failed to import diffusers.models.autoencoders.autoencoder_kl because of the following error (look up to see its traceback): Cannot find ptxas

BrianAllred commented 4 weeks ago

Same issue. The last working commit for me is 4014013.

Arch Linux RTX 3070 Ti

Edit: Turns out this was a bug with Stability Matrix. The latest version fixed this issue for me.