mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Clean up instructioins
This commit is contained in:
parent
dbfc35ece2
commit
e3be28ecca
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Tested on **MacBook Air M2** with **Docker Desktop for Mac with Apple Chip**.
|
* [Installation](#installation)
|
||||||
|
* [Option 1 - Directly on Apple silicon](#option-1---directly-on-apple-silicon)
|
||||||
* [Setup](#setup)
|
|
||||||
* [Directly on Apple silicon](#directly-on-apple-silicon)
|
|
||||||
* [Prerequisites](#prerequisites)
|
* [Prerequisites](#prerequisites)
|
||||||
* [Set up](#set-up)
|
* [Setup](#setup)
|
||||||
* [On a Linux container with Docker for Apple silicon](#on-a-linux-container-with-docker-for-apple-silicon)
|
* [Option 2 - On a Linux container with Docker for Apple silicon](#option-2---on-a-linux-container-with-docker-for-apple-silicon)
|
||||||
* [Prerequisites](#prerequisites-1)
|
* [Prerequisites](#prerequisites-1)
|
||||||
* [Launch and set up a container](#launch-and-set-up-a-container)
|
* [Setup](#setup-1)
|
||||||
* [[Optional] Face Restoration and Upscaling](#optional-face-restoration-and-upscaling)
|
* [[Optional] Face Restoration and Upscaling](#optional-face-restoration-and-upscaling)
|
||||||
|
* [Setup](#setup-2)
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Startup](#startup)
|
* [Startup](#startup)
|
||||||
* [Text to Image](#text-to-image)
|
* [Text to Image](#text-to-image)
|
||||||
@ -18,10 +18,9 @@ Tested on **MacBook Air M2** with **Docker Desktop for Mac with Apple Chip**.
|
|||||||
* [Web Interface](#web-interface)
|
* [Web Interface](#web-interface)
|
||||||
* [Notes](#notes)
|
* [Notes](#notes)
|
||||||
|
|
||||||
# Setup
|
# Installation
|
||||||
|
|
||||||
## Directly on Apple silicon
|
|
||||||
|
|
||||||
|
## Option 1 - Directly on Apple silicon
|
||||||
For Mac M1/M2. Read more about [Metal Performance Shaders (MPS) framework](https://developer.apple.com/documentation/metalperformanceshaders).
|
For Mac M1/M2. Read more about [Metal Performance Shaders (MPS) framework](https://developer.apple.com/documentation/metalperformanceshaders).
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
@ -34,6 +33,7 @@ conda init zsh && source ~/.zshrc # or bash and .bashrc
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
Set it to the fork you want to use.
|
||||||
```Shell
|
```Shell
|
||||||
GITHUB_STABLE_DIFFUSION=https://github.com/santisbon/stable-diffusion.git
|
GITHUB_STABLE_DIFFUSION=https://github.com/santisbon/stable-diffusion.git
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Only need to do this once:
|
|||||||
python3 scripts/preload_models.py
|
python3 scripts/preload_models.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## On a Linux container with Docker for Apple silicon
|
## Option 2 - On a Linux container with Docker for Apple silicon
|
||||||
You [can't access the Macbook M1/M2 GPU cores from the Docker containers](https://github.com/pytorch/pytorch/issues/81224) so performance is reduced but for development purposes it's fine.
|
You [can't access the Macbook M1/M2 GPU cores from the Docker containers](https://github.com/pytorch/pytorch/issues/81224) so performance is reduced but for development purposes it's fine.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
@ -87,7 +87,7 @@ cd ~/Downloads # or wherever you saved sd-v1-4.ckpt
|
|||||||
docker cp sd-v1-4.ckpt dummy:/data
|
docker cp sd-v1-4.ckpt dummy:/data
|
||||||
```
|
```
|
||||||
|
|
||||||
### Launch and set up a container
|
### Setup
|
||||||
Start a container for Stable Diffusion
|
Start a container for Stable Diffusion
|
||||||
```Shell
|
```Shell
|
||||||
docker run -it \
|
docker run -it \
|
||||||
@ -99,16 +99,16 @@ debian
|
|||||||
# or arm64v8/debian
|
# or arm64v8/debian
|
||||||
```
|
```
|
||||||
|
|
||||||
You're now on the container. Set it up:
|
You're now on the container. Set the fork you want to use and set up the container:
|
||||||
```Shell
|
```Shell
|
||||||
|
GITHUB_STABLE_DIFFUSION="-b docker-apple-silicon https://github.com/santisbon/stable-diffusion.git"
|
||||||
|
|
||||||
apt update && apt upgrade -y && apt install -y \
|
apt update && apt upgrade -y && apt install -y \
|
||||||
git \
|
git \
|
||||||
pip3 \
|
pip3 \
|
||||||
python3 \
|
python3 \
|
||||||
wget
|
wget
|
||||||
|
|
||||||
GITHUB_STABLE_DIFFUSION="-b docker-apple-silicon https://github.com/santisbon/stable-diffusion.git"
|
|
||||||
|
|
||||||
# you won't need to close and reopen your terminal after this because we'll source our .<shell>rc file
|
# you won't need to close and reopen your terminal after this because we'll source our .<shell>rc file
|
||||||
cd /data && wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O anaconda.sh \
|
cd /data && wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O anaconda.sh \
|
||||||
&& chmod +x anaconda.sh && bash anaconda.sh -b -u -p /anaconda && /anaconda/bin/conda init bash && source ~/.bashrc
|
&& chmod +x anaconda.sh && bash anaconda.sh -b -u -p /anaconda && /anaconda/bin/conda init bash && source ~/.bashrc
|
||||||
@ -135,13 +135,15 @@ mkdir -p models/ldm/stable-diffusion-v1 \
|
|||||||
```
|
```
|
||||||
|
|
||||||
## [Optional] Face Restoration and Upscaling
|
## [Optional] Face Restoration and Upscaling
|
||||||
```Shell
|
Whether you're directly on macOS or a Linux container.
|
||||||
cd .. # by default expected in a sibling directory
|
|
||||||
git clone https://github.com/TencentARC/GFPGAN.git
|
|
||||||
cd GFPGAN
|
|
||||||
|
|
||||||
pip3 install basicsr # used for training and inference
|
### Setup
|
||||||
pip3 install facexlib # face detection and face restoration helper
|
```Shell
|
||||||
|
# by default expected in a sibling directory to stable-diffusion
|
||||||
|
cd .. && git clone https://github.com/TencentARC/GFPGAN.git && cd GFPGAN
|
||||||
|
|
||||||
|
# basicsr: used for training and inference. facexlib: face detection / face restoration helper.
|
||||||
|
pip3 install basicsr facexlib
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
python3 setup.py develop
|
python3 setup.py develop
|
||||||
@ -149,8 +151,7 @@ pip3 install realesrgan # to enhance the background (non-face) regions and do up
|
|||||||
# pre-trained model needed for face restoration
|
# pre-trained model needed for face restoration
|
||||||
wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P experiments/pretrained_models
|
wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P experiments/pretrained_models
|
||||||
|
|
||||||
cd ..
|
cd ../stable-diffusion
|
||||||
cd stable-diffusion
|
|
||||||
python3 scripts/preload_models.py # if not, it will download model files from the Internet the first time you run dream.py with GFPGAN and Real-ESRGAN turned on.
|
python3 scripts/preload_models.py # if not, it will download model files from the Internet the first time you run dream.py with GFPGAN and Real-ESRGAN turned on.
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -222,7 +223,7 @@ and point your browser to http://127.0.0.1:9090
|
|||||||
|
|
||||||
Some text you can add at the end of the prompt to make it very pretty:
|
Some text you can add at the end of the prompt to make it very pretty:
|
||||||
```Shell
|
```Shell
|
||||||
cinematic photo, highly detailed, cinematic lighting, ultra-detailed, ultrarealistic, photorealism, Octane Rendering, cyberpunk lights, Hyper Detail, 8K, HD, Unreal Engine, V-Ray, full hd, cyberpunk, abstract, 3d octane render + 4k UHD + immense detail + dramatic lighting + well lit + black, purple, blue, pink, cerulean, teal, metallic colours, + fine details, ultra photoreal, photographic, concept art, cinematic composition, rule of thirds, mysterious, eerie, photorealism, breathtaking detailed concept art painting art deco pattern, by hsiao, ron cheng, john james audubon, bizarre compositions, exquisite detail, extremely moody lighting, painted by greg rutkowski makoto shinkai takashi takeuchi studio ghibli, akihiko yoshida
|
cinematic photo, highly detailed, cinematic lighting, ultra-detailed, ultrarealistic, photorealism, Octane Rendering, cyberpunk lights, Hyper Detail, 8K, HD, Unreal Engine, V-Ray, full hd, cyberpunk, abstract, 3d octane render + 4k UHD + immense detail + dramatic lighting + well lit + black, purple, blue, pink, cerulean, teal, metallic colours, + fine details, ultra photoreal, photographic, concept art, cinematic composition, rule of thirds, mysterious, eerie, photorealism, breathtaking detailed, painting art deco pattern, by hsiao, ron cheng, john james audubon, bizarre compositions, exquisite detail, extremely moody lighting, painted by greg rutkowski makoto shinkai takashi takeuchi studio ghibli, akihiko yoshida
|
||||||
```
|
```
|
||||||
|
|
||||||
The original scripts should work as well.
|
The original scripts should work as well.
|
||||||
|
Loading…
Reference in New Issue
Block a user