d8ahazard / sd_dreambooth_extension

Other
1.87k stars 284 forks source link

[Bug]: Installation Error #1387

Closed mario-dg closed 1 year ago

mario-dg commented 1 year ago

Is there an existing issue for this?

What happened?

Trying to install the extension on a fairly fresh SD instance, with no other extension installed yet. The SD instance is running in a Docker container on a remote server.

Steps to reproduce the problem

  1. Go to Extensions.
  2. Install the "Dreambooth" extension
  3. Get the error

Commit and libraries

Starting at Initializing Dreambooth and ending several lines below at [+] bitsandbytes version 0.35.4 installed..

webui-docker-auto-1  | *** Initializing Dreambooth
webui-docker-auto-1  | *** Dreambooth revision: 7e38eeddd085e44ddfb799d6ec8d03573122b571
webui-docker-auto-1  | *** Checking Dreambooth requirements...
webui-docker-auto-1  | *** [Dreambooth] GitPython v3.1.32 is already installed.
webui-docker-auto-1  | *** [Dreambooth] Pillow v9.5.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] accelerate v0.21.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] basicsr v1.4.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] blendmodes v2022 is already installed.
webui-docker-auto-1  | *** [Dreambooth] clean-fid v0.1.35 is already installed.
webui-docker-auto-1  | *** [Dreambooth] einops v0.4.1 is already installed.
webui-docker-auto-1  | *** [Dreambooth] fastapi v0.94.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] gfpgan v1.3.8 is already installed.
webui-docker-auto-1  | *** [Dreambooth] gradio v3.41.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] httpcore v0.15 is already installed.
webui-docker-auto-1  | *** [Dreambooth] inflection v0.5.1 is already installed.
webui-docker-auto-1  | *** [Dreambooth] jsonmerge v1.8.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] kornia v0.6.7 is already installed.
webui-docker-auto-1  | *** [Dreambooth] lark v1.1.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] numpy v1.23.5 is already installed.
webui-docker-auto-1  | *** [Dreambooth] omegaconf v2.2.3 is already installed.
webui-docker-auto-1  | *** [Dreambooth] open-clip-torch v2.20.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] piexif v1.1.3 is already installed.
webui-docker-auto-1  | *** [Dreambooth] psutil v5.9.5 is already installed.
webui-docker-auto-1  | *** [Dreambooth] pytorch_lightning v1.9.4 is already installed.
webui-docker-auto-1  | *** [Dreambooth] realesrgan v0.3.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] resize-right v0.0.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] safetensors v0.3.1 is already installed.
webui-docker-auto-1  | *** [Dreambooth] scikit-image v0.21.0 is already installed.
webui-docker-auto-1  | *** [Dreambooth] timm v0.9.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] tomesd v0.1.3 is already installed.
webui-docker-auto-1  | *** [Dreambooth] torch vNone is already installed.
webui-docker-auto-1  | *** [Dreambooth] torchdiffeq v0.2.3 is already installed.
webui-docker-auto-1  | *** [Dreambooth] torchsde v0.2.5 is already installed.
webui-docker-auto-1  | *** [Dreambooth] transformers v4.30.2 is already installed.
webui-docker-auto-1  | *** [Dreambooth] tensorboard v2.13.0 is not installed.
webui-docker-auto-1  | *** Successfully installed google-auth-oauthlib-1.0.0 tensorboard-2.13.0
webui-docker-auto-1  | *** 

The rest can be seen in the Console Logs

Command Line Arguments

No

Console logs

[+] Building 1.3s (32/32) FINISHED                                                                                                                  
 => [internal] load build definition from Dockerfile                                                                                           0.0s
 => => transferring dockerfile: 4.24kB                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/python:3.10.13-slim                                                                         0.9s
 => [internal] load metadata for docker.io/alpine/git:2.36.2                                                                                   0.9s
 => [internal] load metadata for docker.io/library/alpine:3.17                                                                                 0.9s
 => [internal] load build context                                                                                                              0.0s
 => => transferring context: 657B                                                                                                              0.0s
 => [stage-2  1/14] FROM docker.io/library/python:3.10.13-slim@sha256:3c9182c6498d7de6044be04fb1785ba3a04f953d515d45e5007e8be1c15fdd34         0.0s
 => [download 1/8] FROM docker.io/alpine/git:2.36.2@sha256:ec491c893597b68c92b88023827faa771772cfd5e106b76c713fa5e1c75dea84                    0.0s
 => [xformers 1/3] FROM docker.io/library/alpine:3.17@sha256:f71a5f071694a785e064f05fed657bf8277f1b2113a8ed70c90ad486d6ee54dc                  0.0s
 => CACHED [stage-2  2/14] RUN --mount=type=cache,target=/var/cache/apt   apt-get update &&   apt-get install -y fonts-dejavu-core rsync git   0.0s
 => CACHED [stage-2  3/14] RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip   aria2c -x 5 --dir /cache --out t  0.0s
 => CACHED [stage-2  4/14] RUN --mount=type=cache,target=/root/.cache/pip   git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui  0.0s
 => CACHED [xformers 2/3] RUN apk add --no-cache aria2                                                                                         0.0s
 => CACHED [xformers 3/3] RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/downloa  0.0s
 => CACHED [stage-2  5/14] RUN --mount=type=cache,target=/root/.cache/pip    --mount=type=bind,from=xformers,source=/wheel.whl,target=/xforme  0.0s
 => CACHED [download 2/8] COPY clone.sh /clone.sh                                                                                              0.0s
 => CACHED [download 3/8] RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git cf1d67a6fd5ea1aa6  0.0s
 => CACHED [download 4/8] RUN . /clone.sh CodeFormer https://github.com/sczhou/CodeFormer.git c5b4593074ba6214284d6acd5f1719b6c5d739af   && r  0.0s
 => CACHED [download 5/8] RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9                 0.0s
 => CACHED [download 6/8] RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c    0.0s
 => CACHED [download 7/8] RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96  0.0s
 => CACHED [download 8/8] RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7  0.0s
 => CACHED [stage-2  6/14] COPY --from=download /repositories/ /stable-diffusion-webui/repositories/                                           0.0s
 => CACHED [stage-2  7/14] RUN mkdir /stable-diffusion-webui/interrogate && cp /stable-diffusion-webui/repositories/clip-interrogator/clip_in  0.0s
 => CACHED [stage-2  8/14] RUN --mount=type=cache,target=/root/.cache/pip   pip install -r /stable-diffusion-webui/repositories/CodeFormer/re  0.0s
 => CACHED [stage-2  9/14] RUN --mount=type=cache,target=/root/.cache/pip   pip install pyngrok   git+https://github.com/TencentARC/GFPGAN.gi  0.0s
 => CACHED [stage-2 10/14] RUN apt-get -y install libgoogle-perftools-dev && apt-get clean                                                     0.0s
 => CACHED [stage-2 11/14] RUN --mount=type=cache,target=/root/.cache/pip   cd stable-diffusion-webui &&   git fetch &&   git reset --hard 5e  0.0s
 => CACHED [stage-2 12/14] COPY . /docker                                                                                                      0.0s
 => CACHED [stage-2 13/14] RUN   python3 /docker/info.py /stable-diffusion-webui/modules/ui.py &&   mv /stable-diffusion-webui/style.css /sta  0.0s
 => CACHED [stage-2 14/14] WORKDIR /stable-diffusion-webui                                                                                     0.0s
 => exporting to image                                                                                                                         0.0s
 => => exporting layers                                                                                                                        0.0s
 => => writing image sha256:139aed90152673610c3541589e98fa7820c380026d2fc79a75e11f2d8103440c                                                   0.0s
 => => naming to docker.io/library/sd-auto:67                                                                                                  0.0s
[+] Running 1/1
 ⠿ Container webui-docker-auto-1  Recreated                                                                                                    0.3s
Attaching to webui-docker-auto-1
webui-docker-auto-1  | '/data/models/VAE-approx/model.pt' -> '/stable-diffusion-webui/models/VAE-approx/model.pt'
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted config_states
webui-docker-auto-1  | Mounted .cache
webui-docker-auto-1  | Mounted embeddings
webui-docker-auto-1  | Mounted config.json
webui-docker-auto-1  | Mounted models
webui-docker-auto-1  | Mounted styles.csv
webui-docker-auto-1  | Mounted ui-config.json
webui-docker-auto-1  | Mounted extensions
webui-docker-auto-1  | Installing extension dependencies (if any)
webui-docker-auto-1  | Checkpoint sd-v1-5-inpainting.ckpt [c6bbc15e32] not found; loading fallback agg_3600_v0.ckpt
webui-docker-auto-1  | Calculating sha256 for /stable-diffusion-webui/models/Stable-diffusion/agg_3600_v0.ckpt: Running on local URL:  http://0.0.0.0:7860
webui-docker-auto-1  | 
webui-docker-auto-1  | To create a public link, set `share=True` in `launch()`.
webui-docker-auto-1  | Startup time: 12.1s (import torch: 4.7s, import gradio: 1.1s, setup paths: 1.8s, initialize shared: 0.3s, other imports: 1.2s, setup codeformer: 0.2s, load scripts: 1.4s, create ui: 1.0s, gradio launch: 0.2s, add APIs: 0.2s).
webui-docker-auto-1  | 1c7e0d387df052b244dc7a68882ea14e9d3a5d9b48445f2879fc654fc06bbe34
webui-docker-auto-1  | Loading weights [1c7e0d387d] from /stable-diffusion-webui/models/Stable-diffusion/agg_3600_v0.ckpt
webui-docker-auto-1  | Creating model from config: /stable-diffusion-webui/configs/v1-inference.yaml
webui-docker-auto-1  | Applying attention optimization: xformers... done.
webui-docker-auto-1  | Model loaded in 11.9s (calculate hash: 7.8s, load weights from disk: 2.0s, create model: 1.0s, apply weights to model: 0.8s, calculate empty prompt: 0.1s).
webui-docker-auto-1  | *** Error running install.py for extension /stable-diffusion-webui/extensions/sd_dreambooth_extension.
webui-docker-auto-1  | *** Command: "/usr/local/bin/python" "/stable-diffusion-webui/extensions/sd_dreambooth_extension/install.py"
webui-docker-auto-1  | *** Error code: 1
webui-docker-auto-1  | *** stdout: If submitting an issue on github, please provide the full startup log for debugging purposes.
webui-docker-auto-1  | *** 
SEE ABOVE IN COMMIT AND LIBRARIES
webui-docker-auto-1  | *** stderr: [2023-11-16 13:59:07,019][INFO][torch.distributed.nn.jit.instantiator] - Created a temporary directory at /tmp/tmpw__na_hf
webui-docker-auto-1  | *** [2023-11-16 13:59:07,019][INFO][torch.distributed.nn.jit.instantiator] - Writing /tmp/tmpw__na_hf/_remote_module_non_scriptable.py
webui-docker-auto-1  | *** /usr/local/lib/python3.10/site-packages/pytorch_lightning/utilities/distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
webui-docker-auto-1  | ***   rank_zero_deprecation(
webui-docker-auto-1  | *** [2023-11-16 13:59:09,225][DEBUG][git.cmd] - Popen(['git', 'version'], cwd=/stable-diffusion-webui, universal_newlines=False, shell=None, istream=None)
webui-docker-auto-1  | *** [2023-11-16 13:59:09,235][DEBUG][git.cmd] - Popen(['git', 'version'], cwd=/stable-diffusion-webui, universal_newlines=False, shell=None, istream=None)
webui-docker-auto-1  | *** [2023-11-16 13:59:09,279][DEBUG][git.cmd] - Popen(['git', 'cat-file', '--batch-check'], cwd=/data/config/auto/extensions/sd_dreambooth_extension, universal_newlines=False, shell=None, istream=<valid stream>)
webui-docker-auto-1  | *** Traceback (most recent call last):
webui-docker-auto-1  | ***   File "/stable-diffusion-webui/extensions/sd_dreambooth_extension/install.py", line 35, in <module>
webui-docker-auto-1  | ***     actual_install()
webui-docker-auto-1  | ***   File "/stable-diffusion-webui/extensions/sd_dreambooth_extension/postinstall.py", line 47, in actual_install
webui-docker-auto-1  | ***     check_bitsandbytes()
webui-docker-auto-1  | ***   File "/stable-diffusion-webui/extensions/sd_dreambooth_extension/postinstall.py", line 179, in check_bitsandbytes
webui-docker-auto-1  | ***     bitsandbytes_version = importlib_metadata.version("bitsandbytes")
webui-docker-auto-1  | ***   File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 996, in version
webui-docker-auto-1  | ***     return distribution(distribution_name).version
webui-docker-auto-1  | ***   File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 969, in distribution
webui-docker-auto-1  | ***     return Distribution.from_name(distribution_name)
webui-docker-auto-1  | ***   File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
webui-docker-auto-1  | ***     raise PackageNotFoundError(name)
webui-docker-auto-1  | *** importlib.metadata.PackageNotFoundError: No package metadata was found for bitsandbytes


### Additional information

_No response_
mario-dg commented 1 year ago

Updated to latest version is now working