From 9c8f4c3ac19b9dfb5f7c50c3f58dfaba8c6e23af Mon Sep 17 00:00:00 2001 From: novarobot <88540431+novarobot@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:32:18 +0100 Subject: [PATCH] Update README.md --- README.md | 81 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index d776be9..48f45c8 100644 --- a/README.md +++ b/README.md @@ -22,35 +22,23 @@ sudo apt-get -y install git wget build-essential ``` ## Installation of Stable-Diffusion-cpuonly -### Download Stable-Diffusion-cpuonly - -Copy this github repository and extract the files. - -### Download the CompVis Stable-diffusion model. - -Go here and download the correct mode from here. You'll have to agree to the license setup an account but this is the bread and butter AI art generating learning model. - -https://huggingface.co/CompVis/stable-diffusion-v-1-4-original - -copy the file to your stable-diffusion-cpuonly-main directory - -### Download the GFPGAN model - -https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth - -copy the file to your stable-diffusion-cpuponly-main directory - -### Create a working folder - +### Create a working folder and download githun +``` sudo mkdir /opt/StableDiffusion sudo chmod 777 /opt/StableDiffusion cd /opt/StableDiffusion -install conda (optional but highly recommended) +git clone https://github.com/novarobot/stable-diffusion-cpuonly.git + +``` + +### install conda (optional but highly recommended) Don't put it on both bash and zsh, just do one installation!!! + +``` install conda under zsh (optional) sudo apt install zsh @@ -60,10 +48,12 @@ copy the default zshrc file (optional) cp ./stable-diffusion-cpuonly/.zshrc /home/USERNAME zsh +``` (if you haven't copied the zshrc, create the appropriate one with the menu that appears. If you copied it, the menu will not appear) - +``` wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + chmod 777 Miniconda3-latest-Linux-x86_64.sh The installation location is e.g.: /opt/StableDiffusion/Miniconda3 @@ -73,25 +63,68 @@ Don't run conda init! (just hit enter) ./Miniconda3/bin/conda init zsh exit + #Back to zsh again + zsh + #A prefix (base) had to appear before the prompt! + conda env create -f ./stable-diffusion-cpuonly/environment-cpuonly.yaml + conda activate sdco + #A prefix (sdco) had to appear before the prompt! +``` -install conda under bash (original solution) +##install conda under bash (original solution) +``` wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + chmod 777 Miniconda3-latest-Linux-x86_64.sh The installation location is e.g.: /opt/StableDiffusion/Miniconda3 + Run conda init (yes) + Exit and return to the terminal + A prefix (base) had to appear before the prompt! conda env create -f ./stable-diffusion-cpuonly/environment-cpuonly.yaml + conda activate sdco + A prefix (sdco) had to appear before the prompt! +``` + + +### Download Stable-Diffusion-cpuonly + +Copy this github repository and extract the files. + +### Download the CompVis Stable-diffusion model. + +Go here and download the correct mode from here. You'll have to agree to the license setup an account but this is the bread and butter AI art generating learning model. + +https://huggingface.co/CompVis/stable-diffusion-v-1-4-original + + +``` +wget https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt +mv sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt +``` + +### Download the GFPGAN model + +https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth + + +``` +wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth +mv GFPGANv1.3.pth src/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth +``` + ### Linux - Running the install script @@ -103,8 +136,6 @@ install_sdco.sh Run the following command -activate manual conda enviroment ! (optional, but strongly recommended) - run_sdco.sh ```