Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions comfyui-desktop/comfyui.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=ComfyUI
Exec="/opt/comfyui/run.sh"
Type=Application
Terminal=true
Icon=/opt/comfyui/comfyui.png
Categories=Utility;
Binary file added comfyui-desktop/comfyui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions setup-desktop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
read -p "ComfyUI Path: " COMFYUI_PATH
COMFYUI_PATH=${COMFYUI_PATH}

DEFAULT_VENV="${COMFYUI_PATH}venv"
read -p "VEnv path (default: $DEFAULT_VENV): " VENV_PATH
VENV_PATH=${VENV_PATH:-$DEFAULT_VENV}

RUN_SCRIPT="comfyui-desktop/run.sh"
cat > "$RUN_SCRIPT" << EOL
#!/bin/bash
source "${VENV_PATH}/bin/activate"
cd "$COMFYUI_PATH"
python main.py
EOL

chmod +x "$RUN_SCRIPT"
if [ ! -d "/opt/comfyui" ]; then
mkdir -p /opt/comfyui
if [ $? -ne 0 ]; then
echo "Error: Failed to create /opt/comfyui. Please check permissions or run as root."
exit 1
fi
fi

cp 'comfyui-desktop/comfyui.png' /opt/comfyui/comfyui.png
cp 'comfyui-desktop/run.sh' /opt/comfyui/run.sh
cp 'comfyui-desktop/comfyui.desktop' /usr/share/applications/comfyui.desktop

echo "Setup complete! You can run ComfyUI using Start menu"
echo "comfyui.desktop copied to /usr/share/applications/comfyui.desktop"