mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-12 15:59:00 +08:00
Refactor to automatic installation instructions
parent
ac3e10309c
commit
03bed58139
@ -1,46 +1,24 @@
|
|||||||
**IMPORTANT** While the web UI runs fine, there are still certain issues when running this fork on Apple Silicon.
|
## Important note
|
||||||
|
|
||||||
|
While the web UI runs fine, there are still certain issues when running this fork on Apple Silicon.
|
||||||
The only 2 samplers that work (at the time of writing this) are `Euler` and `DPM2` - all others result in a black screen.
|
The only 2 samplers that work (at the time of writing this) are `Euler` and `DPM2` - all others result in a black screen.
|
||||||
Upscaling works, but only using the real-ESRGAN models.
|
Upscaling works, but only using the real-ESRGAN models.
|
||||||
|
|
||||||
First get the weights checkpoint download started - it's big:
|
## Automatic installation
|
||||||
|
|
||||||
Sign up at https://huggingface.co
|
This script assumes you've installed the same dependencies as the other scripts (python, git, ...) - these can all be installed using [Homebrew](https://brew.sh/).
|
||||||
Go to the Stable diffusion diffusion model page
|
|
||||||
Accept the terms and click Access Repository:
|
The script can be downloaded from [here](https://github.com/dylancl/stable-diffusion-webui-mps/blob/master/setup_mac.sh), or follow the instructions below.
|
||||||
Download sd-v1-4.ckpt (4.27 GB) and note where you have saved it (probably the Downloads folder)
|
|
||||||
|
1. Open Terminal.app
|
||||||
|
2. Run the following command:
|
||||||
|
|
||||||
1. `brew install cmake protobuf rust`
|
|
||||||
2. `curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o Miniconda3-latest-MacOSX-arm64.sh`
|
|
||||||
3. `/bin/bash Miniconda3-latest-MacOSX-arm64.sh`
|
|
||||||
4. `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui`
|
|
||||||
5. `cd stable-diffusion-webui`
|
|
||||||
6. Run the following commands one by one:
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/CompVis/stable-diffusion.git repositories/stable-diffusion
|
bash <(curl -s https://github.com/dylancl/stable-diffusion-webui-mps/blob/master/setup_mac.sh)
|
||||||
|
|
||||||
git clone https://github.com/CompVis/taming-transformers.git repositories/taming-transformers
|
|
||||||
|
|
||||||
git clone https://github.com/sczhou/CodeFormer.git repositories/CodeFormer
|
|
||||||
|
|
||||||
git clone https://github.com/salesforce/BLIP.git repositories/BLIP
|
|
||||||
```
|
```
|
||||||
|
3. Follow the instructions in the terminal window.
|
||||||
|
|
||||||
7. `conda create --name web_ui python=3.10`
|
#### Usage
|
||||||
8. `conda activate web_ui`
|
|
||||||
9. `pip install -r requirements.txt`
|
|
||||||
10. `conda install pytorch torchvision torchaudio -c pytorch-nightly`
|
|
||||||
11. At this point, move the downloaded `sd-v1-4.ckpt` file into `stable-diffusion-webui/models/`. You will know it's the right folder since there's a text file named `Put Stable Diffusion checkpoints here.txt` in it.
|
|
||||||
12. `conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1`
|
|
||||||
13. `python webui.py --precision full --no-half --opt-split-attention-v1`
|
|
||||||
|
|
||||||
It is possible that after running `webui.py` you get error messages saying certain packages are missing. Install the missing package, go back to step 13 and repeat.
|
After installation, you'll now find `run_webui_mac.sh` in the `stable-diffusion-webui` directory. Run this script to start the web UI using `./run_webui_mac.sh`.
|
||||||
|
This script automatically activates the conda environment, pulls the latest changes from the repository, and starts the web UI. On exit, the conda environment is deactivated.
|
||||||
#### Common Errors
|
|
||||||
|
|
||||||
##### Error
|
|
||||||
|
|
||||||
`ImportError: dlopen(.venv/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace (__ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_)`
|
|
||||||
|
|
||||||
##### Solution
|
|
||||||
|
|
||||||
Downgrade Protobuf using `pip install protobuf==3.19.4`
|
|
Loading…
x
Reference in New Issue
Block a user