Last active
January 12, 2024 18:58
-
-
Save adde88/0fb1622943af4f53c506691f558410dd to your computer and use it in GitHub Desktop.
Stable Diffusion: Systemd service-file (Debian Linux), to automatically start at boot
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 characters
# Script to run Stable Diffusion at launch using systemd | |
# Modify script, like directories and username as needed | |
# File should then be located here: /usr/lib/systemd/system/stable-diffusion.service | |
# Then run "sudo systemctl enable stable-diffusion" | |
# "sudo systemctl start stable-diffusion" | |
# | |
# Written by Andreas Nilsen - <[email protected]> | |
# | |
# | |
[Unit] | |
Description=Stable Diffusion AUTOMATIC1111 Web UI Service | |
After=network.target auditd.service | |
StartLimitIntervalSec=30 | |
StartLimitBurst=2 | |
[Service] | |
Type=simple | |
Restart=always | |
RestartSec=2 | |
User=andreas | |
Group=andreas | |
ExecStart=/bin/bash /home/andreas/stable-diffusion/webui.sh | |
WorkingDirectory=/home/andreas/stable-diffusion | |
StandardOutput=append:/var/log/stable-diffusion/sdwebui.log | |
StandardError=append:/var/log/stable-diffusion/sdwebui.log | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment