Another issue you may have when installing is that on first boot, pip
will install dependencies into the Python Virtual Environment. Normally, this isn't an issue; but if you have a Swap partition mounted, then the temporary directories built for these dependencies will be placed in the Swap space. If your swap partition is smaller than 10 GB, then you'll run out of Swap space and the dependency installations will fail. This could potentially prevent the UI from booting on the first run.
To fix this, do the following in your terminal:
# Delete the venv folder
rm -r /opt/stable-diffusion-web-ui/venv
# Create a temporary folder in a partition with at least 10GB of space
mkdir -p /path/to/your/temporary/directory
# Run the UI server with the TMPDIR environment variable set to your improvised temporary folder's path
TMPDIR=/path/to/your/temporary/directory stable-diffusion-web-ui-server
# Don't forget to delete the temporary files when you're done!
rm -rf /path/to/your/temporary/directory
The problem will go away once you've done this, and the UI should boot normally from then on.
Pinned Comments
bhill commented on 2023-11-21 09:06 (UTC)
Make sure to consider your hardware before installing AI programs: They're very resource intense and require capable hardware just to run.
For example: If your intended device has less than 6 GB of VRAM, I would advise against installing this. Everything would download and the UI would boot, but once you try to generate an image, you'll receive an error saying there's not enough VRAM to generate images.