Forked from geerlingguy/stable-diffusion-ubuntu-2004-amd.sh
Created
July 9, 2023 19:27
-
-
Save tigefa4u/cadf4e32678200320e09b254328c00b8 to your computer and use it in GitHub Desktop.
Revisions
-
geerlingguy renamed this gist
Oct 26, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
geerlingguy revised this gist
Sep 1, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ # Note: This will only work on Navi21 GPUs (6800/6900+). # See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570 # Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers) wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh -
geerlingguy revised this gist
Sep 1, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Note: This will only work on Navi21 GPUs (6800/6900+). # Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers) wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh bash Miniconda3-py39_4.12.0-Linux-x86_64.sh -
geerlingguy renamed this gist
Sep 1, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
geerlingguy revised this gist
Aug 31, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ cd stable-diffusion/ conda remove cudatoolkit -y pip3 uninstall torch torchvision -y # Install PyTorch ROCm pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.0 pip3 install transformers==4.19.2 scann kornia==0.6.4 torchmetrics==0.6.0 # Generate an image -
geerlingguy revised this gist
Aug 31, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ ln -s -r sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt # Install AMD ROCm support wget https://repo.radeon.com/amdgpu-install/22.10/ubuntu/focal/amdgpu-install_22.10.50100-1_all.deb sudo apt-get install ./amdgpu-install_22.10.50100-1_all.deb sudo amdgpu-install --usecase=dkms,graphics,rocm,lrt,hip,hiplibsdk # make sure you see your GPU by running rocm-smi # Make AMD GPU work with ROCm -
geerlingguy created this gist
Aug 31, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ # Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers) wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh bash Miniconda3-py39_4.12.0-Linux-x86_64.sh # follow the prompts to install it, and run `conda` to make sure it's working. # Install git and curl, and clone the stable-diffusion repo sudo apt install -y git curl cd Downloads git clone https://github.com/CompVis/stable-diffusion.git # Install dependencies and activate environment cd stable-diffusion conda env create -f environment.yaml conda activate ldm # Download Stable Diffusion weights curl https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media > sd-v1-4.ckpt # Symlink the weights into place mkdir -p models/ldm/stable-diffusion-v1/ ln -s -r sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt # Install AMD ROCm support wget https://repo.radeon.com/amdgpu-install/22.10/ubuntu/focal/amdgpu-install_22.10.50100-1_all.deb sudo apt-get install ./amdgpu-install_22.10.50100-1_all.deb sudo amdgpu-install --rocmrelease=5.2.3 --usecase=dkms,graphics,rocm,lrt,hip,hiplibsdk # make sure you see your GPU by running rocm-smi # Make AMD GPU work with ROCm cd stable-diffusion/ conda remove cudatoolkit -y pip3 uninstall torch torchvision -y # Install PyTorch ROCm pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.1 pip3 install transformers==4.19.2 scann kornia==0.6.4 torchmetrics==0.6.0 # Generate an image python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms