-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Local Development Scripts #127
base: master
Are you sure you want to change the base?
Add Local Development Scripts #127
Conversation
I would recommend changing the names of the installation scripts to be more descriptive instead of numbering to know how they differ, or at least add a documentation comment to the top of each one. |
|
||
echo ">> Downloading model weights (4gb, may take awhile)" | ||
# Download v1.4 model weights (so you can run `python txt2img.py` locally when testing) | ||
wget "https://me.cmdr2.org/stable-diffusion-ui/sd-v1-4.ckpt" -O sd-v1-4.ckpt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wget
is not available on macOS by default, use curl
instead for portability
|
||
echo ">> Creating environment diffusion bee" | ||
# Create fresh python environment | ||
conda create --name diffusionbee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conda
does not ship with macOS
# Download stable diffusion info | ||
cd backends/stable_diffusion_torch | ||
|
||
echo ">> Downloading stable diffusion code" | ||
# Download the m1-compatible Stable Diffusion sampling infrastructure | ||
git clone https://github.com/magnusviri/stable-diffusion.git | ||
cd stable-diffusion | ||
git checkout apple-mps-support | ||
cd .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pushd
and popd
instead of having to manually move around. (This script ends without returning the user to the root of the directory, by the by! With this, you can just popd
at the end and leave the user at the beginning)
# Download stable diffusion info | |
cd backends/stable_diffusion_torch | |
echo ">> Downloading stable diffusion code" | |
# Download the m1-compatible Stable Diffusion sampling infrastructure | |
git clone https://github.com/magnusviri/stable-diffusion.git | |
cd stable-diffusion | |
git checkout apple-mps-support | |
cd .. | |
# Download stable diffusion info | |
pushd backends/stable_diffusion_torch | |
echo ">> Downloading stable diffusion code" | |
# Download the m1-compatible Stable Diffusion sampling infrastructure | |
git clone https://github.com/magnusviri/stable-diffusion.git | |
pushd stable-diffusion | |
git checkout apple-mps-support | |
popd |
|
||
echo ">> Setting up electron app" | ||
cd electron_app | ||
npm i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm does not ship with macOS. Consider checking for the existence of these commands upfront, and providing users with better context, with e.g.
if ! [ -x "$(command -v npm)" ]; then
echo 'Error: npm is not installed.' >&2
exit 1
fi
This PR adds 2 install scripts that automate the process of getting started with contributing to
DiffusionBee
This is an amazing project, and I'm sure more people would be interested in contributing if getting started was a no-brainer