mirror of
https://github.com/openoms/bitcoin-tutorials.git
synced 2025-12-18 12:34:20 +01:00
add stable diffusion notes
This commit is contained in:
15
ai/nvidia-driver-install.sh
Normal file
15
ai/nvidia-driver-install.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
sudo apt-get install -y linux-headers-$(uname -r)
|
||||
# for TCMalloc (improves CPU memory usage)
|
||||
sudo apt install -y libgoogle-perftools-dev
|
||||
|
||||
|
||||
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/535.86.05/NVIDIA-Linux-x86_64-535.86.05.run
|
||||
|
||||
chmod +x NVIDIA-Linux-x86_64-535.86.05.run
|
||||
|
||||
sudo ./NVIDIA-Linux-x86_64-535.86.05.run
|
||||
|
||||
# disable nuveau drivers
|
||||
# needs reboot
|
||||
|
||||
# ? install pkg-config
|
||||
76
ai/stable-diffusion.sh
Normal file
76
ai/stable-diffusion.sh
Normal file
@@ -0,0 +1,76 @@
|
||||
Got a fresh instance of the https://github.com/AUTOMATIC1111/stable-diffusion-webui for logo design experiments at: https://stablediffusion.diynodes.com/
|
||||
To generate .svg files - choose the script `Vector Studio` on the bottom.
|
||||
more info at: https://github.com/GeorgLegato/stable-diffusion-webui-vectorstudio
|
||||
Promting it is a bit of an art, but go ahead and play until my disk is full or the server crashes.
|
||||
|
||||
sudo adduser --disabled-password --gecos "" sd
|
||||
sudo su - sd
|
||||
|
||||
cd download
|
||||
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
|
||||
cd stable-diffusion-webui
|
||||
./webui.sh
|
||||
|
||||
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers#building-xformers-on-linux-from-anonymous-user
|
||||
|
||||
# REVERSE PROXY
|
||||
sudo nano /etc/nginx/conf.d/stablediffusionwebui.conf
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:7861;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:7860;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
|
||||
sudo nginx -t && sudo systemctl restart nginx
|
||||
|
||||
# SYSTEMD SERVICE
|
||||
sudo systemctl edit --full --force stablediffusionwebui.service
|
||||
[Unit]
|
||||
Description=Web UI script
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=sd
|
||||
Group=sd
|
||||
WorkingDirectory=/home/sd/stable-diffusion-webui
|
||||
ExecStart=/bin/bash /home/sd/stable-diffusion-webui/webui.sh
|
||||
Restart=always
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
TimeoutSec=60
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
||||
# Hardening measures
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
NoNewPrivileges=true
|
||||
# PrivateDevices=true - breaks CUDA check
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
sudo systemctl enable --now stablediffusionwebui.service
|
||||
|
||||
sudo systemctl restart stablediffusionwebui.service
|
||||
|
||||
|
||||
https://github.com/GeorgLegato/stable-diffusion-webui-vectorstudio
|
||||
sudo apt install potrace
|
||||
ln -s /usr/bin/potrace extensions/stable-diffusion-webui-vectorstudio/bin/potrace
|
||||
|
||||
nano webui-user.sh
|
||||
export COMMANDLINE_ARGS="--xformers --share"
|
||||
|
||||
|
||||
tmux a
|
||||
~/download/stable-diffusion-webui/webui.sh
|
||||
Reference in New Issue
Block a user