I’m quite late to the game, but I decided to try out image generation AI and installed ComfyUI on Ubuntu.
Basically, I just needed to follow the ComfyUI Wiki ⧉.
comfycli
python -m venv comfy-envsource comfy-env/bin/activatepip install comfy-clicomfy --install-compcomfy installpip3 install torch torchvision torchaudiocomfy launch -- --listen 0.0.0.0It was installed in ~/comfy/ComfyUI/. By using --listen 0.0.0.0, I can access it from a browser on another PC via ip address:8188.
Auto-start with systemd
Create a startup script
vim ~/comfy/comfyui-start.sh#!/bin/bashcd /home/myusername/comfysource /home/myusername/.bashrcsource /home/myusername/comfy-env/bin/activatecomfy launch -- --listen 0.0.0.0chmod +x ~/comfy/comfyui-start.shCreate a systemd unit file
sudo vim /etc/systemd/system/comfyui.service[Unit]Description=ComfyUI ServiceAfter=network.target
[Service]Type=simpleUser=myusernameExecStart=/home/myusername/comfy/comfyui-start.shRestart=alwaysWorkingDirectory=/home/myusername/comfy/ComfyUI
[Install]WantedBy=multi-user.targetRegister with systemd
sudo systemctl daemon-reexecsudo systemctl daemon-reloadsudo systemctl enabel comfyuisudo systemctl start comfyuisystemctl status comfyui