AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.78k stars 25.92k forks source link

[Bug]: fail to start stable-diffusion-webui on centos7 #15060

Closed yenaikafei closed 4 months ago

yenaikafei commented 4 months ago

Checklist

What happened?

python webui.py Warning: Stable Diffusion XL not found at path /app/stable-diffusion/stable-diffusion-webui/repositories/generative-models/sgm Warning: k_diffusion not found at path /app/stable-diffusion/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py Traceback (most recent call last): File "/app/stable-diffusion/stable-diffusion-webui/webui.py", line 13, in initialize.imports() File "/app/stable-diffusion/stable-diffusion-webui/modules/initialize.py", line 24, in imports from modules import paths, timer, import_hook, errors # noqa: F401 File "/app/stable-diffusion/stable-diffusion-webui/modules/import_hook.py", line 10, in import torchvision.transforms.functional_tensor # noqa: F401 File "/home/iss/micromamba/envs/sd/lib/python3.10/site-packages/torchvision/init.py", line 6, in from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils File "/home/iss/micromamba/envs/sd/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 164, in def meta_nms(dets, scores, iou_threshold): File "/home/iss/micromamba/envs/sd/lib/python3.10/site-packages/torch/library.py", line 440, in inner handle = entry.abstract_impl.register(func_to_register, source) File "/home/iss/micromamba/envs/sd/lib/python3.10/site-packages/torch/_library/abstract_impl.py", line 30, in register if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, "Meta"): RuntimeError: operator torchvision::nms does not exist (sd) [iss@ecs-8dd4-0001 stable-diffusion-webui]$

Steps to reproduce the problem

I following https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs Manual Installation Error reported during command execution: python webui.py

What should have happened?

Webui should be started

What browsers do you use to access the UI ?

No response

Sysinfo

NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

3.10.0-1160.92.1.el7.x86_64

Using Microamba for Virtual Environment Management

Console logs

bash 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 iss user
################################################################

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

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

################################################################
Launching launch.py...
################################################################
Cannot locate TCMalloc (improves CPU memory usage)
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0]
Version: 1.7.0
Commit hash: <none>
Installing clip
Installing open_clip
Couldn't determine Stable Diffusion's hash: cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf, attempting autofix...
Fetching all contents for Stable Diffusion
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Traceback (most recent call last):
  File "/app/stable-diffusion/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/app/stable-diffusion/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/app/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py", line 408, in prepare_environment
    git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
  File "/app/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py", line 178, in git_clone
    current_hash = run_git(dir, name, 'rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()
  File "/app/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py", line 166, in run_git
    git_fix_workspace(dir, name)
  File "/app/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py", line 153, in git_fix_workspace
    run(f'"{git}" -C "{dir}" fetch --refetch --no-auto-gc', f"Fetching all contents for {name}", f"Couldn't fetch {name}", live=True)
  File "/app/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't fetch Stable Diffusion.
Command: "git" -C "/app/stable-diffusion/stable-diffusion-webui/repositories/stable-diffusion-stability-ai" fetch --refetch --no-auto-gc
Error code: 129

Additional information

No response

supergangchao commented 3 months ago

how resolve it problem

mirh commented 2 months ago

Most obviously, your git version for some reason isn't accepting the -C parameter. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/adadb4e3c7382bf3e4f7519126cd6c70f4f8557b/modules/launch_utils.py#L151-L159 I can just guess you or red hat still didn't update it to 1.8.5 (when it was added, a decade ago).