|
#!/bin/bash |
|
|
|
|
|
install_dir=~/ |
|
do_aws_setup=true |
|
|
|
|
|
mkdir -p "$install_dir/models" |
|
mkdir -p "$install_dir/datasets" |
|
|
|
|
|
cd "$install_dir" || exit |
|
git clone https://github.com/Mikubill/naifu-diffusion nd && cd nd |
|
git checkout sgm |
|
pip install -r requirements.txt xformers prodigyopt |
|
|
|
|
|
param_calc="https://huggingface.co/trojblue/nd-param-calculator/resolve/main/nd_param_calculator_latest.ipynb" |
|
wget "$param_calc" |
|
|
|
|
|
if [ "$do_aws_setup" = true ]; then |
|
echo "Setting up AWS..." |
|
|
|
if ! command -v aws &> /dev/null; then |
|
echo "Installing AWS CLI..." |
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
|
sudo apt install unzip && unzip awscliv2.zip |
|
sudo ./aws/install |
|
rm awscliv2.zip |
|
else |
|
echo "AWS CLI is already installed." |
|
fi |
|
|
|
|
|
cd "$install_dir/models" || exit |
|
aws s3 cp s3://bucket-external/trainer_opt/sdxl-fulldan-run-continue/checkpoint/nd-epoch-09.ckpt fd5me9.ckpt |
|
else |
|
echo "Skipping AWS setup..." |
|
fi |
|
|
|
|
|
|