sd-web
2024-3-14 14:43:5 Author: dyrnq.com(查看原文) 阅读量:20 收藏

ref

bash

conda create -n webui python=3.10.6
conda activate webui

git clone [email protected]:AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui


pip install tb-nightly -i https://mirrors.aliyun.com/pypi/simple/
pip install -r requirements_versions.txt -i https://pypi.tuna.tsinghua.edu.cn/simple


pip install https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip
pip install https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U -I --no-deps xformers==0.0.20 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install ngrok -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r repositories/CodeFormer/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple



mkdir -p repositories

git clone [email protected]:Stability-AI/stablediffusion.git ./repositories/stable-diffusion-stability-ai
git -C ./repositories/stable-diffusion-stability-ai checkout cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf

git clone [email protected]:Stability-AI/generative-models.git ./repositories/generative-models
git -C ./repositories/generative-models checkout 45c443b316737a4ab6e40413d7794a7f5657c19f

git clone [email protected]:crowsonkb/k-diffusion.git ./repositories/k-diffusion
git -C ./repositories/k-diffusion checkout ab527a9a6d347f364e3d185ba6d714e22d80cb3c

git clone [email protected]:sczhou/CodeFormer.git ./repositories/CodeFormer
git -C ./repositories/CodeFormer checkout c5b4593074ba6214284d6acd5f1719b6c5d739af

git clone [email protected]:salesforce/BLIP.git ./repositories/BLIP
git -C ./repositories/BLIP checkout 48211a1594f1321b00f14c9f7a5b4813144b2fb9



git clone [email protected]:AUTOMATIC1111/stable-diffusion-webui-assets.git ./repositories/stable-diffusion-webui-assets



pushd models/Stable-diffusion
curl -SL --output v2-1_768-ema-pruned.safetensors \
"https://modelscope.cn/api/v1/models/AI-ModelScope/stable-diffusion-2-1/repo?Revision=master&FilePath=v2-1_768-ema-pruned.safetensors"
popd


python webui.py --listen --skip-version-check --no-half
You are running torch 2.0.1+cu118.
The program is tested to work with torch 2.1.2.
## cu118
pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118
## cu121
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu121

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.20 requires pyre-extensions==0.0.29, which is not installed.



    modules.devices.NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.



WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.1.2+cu121)
    Python  3.10.11 (you have 3.10.6)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
No module 'xformers'. Proceeding without it.
Loading weights [dcd690123c] from /data/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-ema-pruned.safetensors
Running on local URL:  http://0.0.0.0:7861

tree stable-diffusion-webui/models/
stable-diffusion-webui/models/
├── Codeformer
├── deepbooru
│   └── Put your deepbooru release project folder here.txt
├── GFPGAN
├── hypernetworks
├── karlo
│   └── ViT-L-14_stats.th
├── Lora
├── Stable-diffusion
│   ├── Put Stable Diffusion checkpoints here.txt
│   └── v2-1_768-ema-pruned.safetensors
├── VAE
│   ├── Put VAE here.txt
│   └── vae-ft-mse-840000-ema-pruned.safetensors
└── VAE-approx
    └── model.pt

10 directories, 7 files

links


文章来源: https://dyrnq.com/sd-web/
如有侵权请联系:admin#unsafe.sh