Last active
September 19, 2023 19:26
-
-
Save GabrielVidal1/b4a3b5c43614f6613508ab0114c65473 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Vars | |
ROOT=/workspace | |
SD_DIR=sd | |
MODEL_DIR=$ROOT/$SD_DIR/models/Stable-diffusion | |
VENV=env | |
GRADIO_AUTH=user:password123 | |
SD_REPO=https://github.com/AUTOMATIC1111/stable-diffusion-webui.git | |
# Install packages | |
apt update | |
apt-get install ffmpeg libsm6 libxext6 -y | |
# Clone SD | |
git clone $SD_REPO $ROOT/$SD_DIR | |
# Plugins | |
cat << PLUGINS | wget -i - -P $ROOT/$SD_DIR/scripts; | |
https://raw.githubusercontent.com/memes-forever/Stable-diffusion-webui-video/main/videos.py | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards.py | |
https://raw.githubusercontent.com/ThereforeGames/txt2img2img/main/scripts/txt2img2img.py | |
https://raw.githubusercontent.com/yownas/seed_travel/main/scripts/seed_travel.py | |
https://raw.githubusercontent.com/Filarius/stable-diffusion-webui/master/scripts/vid2vid.py | |
https://raw.githubusercontent.com/yownas/shift-attention/main/scripts/shift_attention.py | |
https://gist.githubusercontent.com/GabrielVidal1/ad2dee1a54a02929515aad11e1e884df/raw/5116d54eba0edaf40b4db9c31a2d2387f187579c/save_steps.py | |
PLUGINS | |
## Wildcard Plugin Data | |
mkdir $ROOT/$SD_DIR/scripts/wildcards | |
cat << WILDCARDS | wget -i - -P $ROOT/$SD_DIR/scripts/wildcards; | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/adjective.txt | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/artist.txt | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/genre.txt | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/site.txt | |
https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/style.txt | |
WILDCARDS | |
# Install Gdrive CLI | |
wget https://github.com/prasmussen/gdrive/releases/download/2.1.1/gdrive_2.1.1_linux_386.tar.gz -O gdrive.tar.gz | |
tar -xvf gdrive.tar.gz | |
chmod +x gdrive | |
mv gdrive /bin | |
rm gdrive.tar.gz | |
# Create Python Venv | |
python3 -m venv $VENV | |
source $VENV/bin/activate | |
# Install dependencies | |
pip install gdown | |
pip install moviepy==1.0.3 | |
# Launch Script | |
cat << LAUNCH_SCRIPT > launch.sh | |
#!/bin/bash | |
export COMMANDLINE_ARGS="--share --gradio-auth=$GRADIO_AUTH --port=7860" | |
export REQS_FILE=requirements.txt | |
source $VENV/bin/activate | |
cd $ROOT/$SD_DIR | |
python3 launch.py | |
LAUNCH_SCRIPT | |
chmod +x launch.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there, thank you.
I get this error, how can I install the checkpoints?
Installing requirements for Web UI
Launching Web UI with arguments: --share --gradio-auth=user:password123 --port=7860
Error loading script: txt2img2img.py
Traceback (most recent call last):
File "/workspace/sd/modules/scripts.py", line 170, in load_scripts
exec(compiled, module.dict)
File "/workspace/sd/scripts/txt2img2img.py", line 21, in
from txt2img2img.dependencies import shortcodes
ModuleNotFoundError: No module named 'txt2img2img'
Error loading script: wildcards.py
Traceback (most recent call last):
File "/workspace/sd/modules/scripts.py", line 168, in load_scripts
compiled = compile(text, scriptfile.path, 'exec')
File "/workspace/sd/scripts/wildcards.py", line 1
See the ReadMe!
^
SyntaxError: invalid syntax
No checkpoints found. When searching for checkpoints, looked at:
Can't run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit.