Last active
February 26, 2025 17:20
-
-
Save Limbicnation/33c66e7c21690c35ac8ebb0b5571ea16 to your computer and use it in GitHub Desktop.
Run ComfyUI on Ubuntu 22.04
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
| #!/bin/bash | |
| # Define the directory where ComfyUI is located | |
| COMFYUI_DIR="$HOME/GitHub/ComfyUI" | |
| # Check if Conda is installed | |
| if ! command -v conda &> /dev/null; then | |
| echo "Error: Conda is not installed. Please install Conda and try again." | |
| exit 1 | |
| fi | |
| # Activate the Conda environment | |
| echo "Activating the conda environment 'comfyui'..." | |
| if eval "$(conda shell.bash hook)" && conda activate comfyui; then | |
| echo "Conda environment 'comfyui' activated." | |
| else | |
| echo "Error: Failed to activate the conda environment 'comfyui'." | |
| exit 1 | |
| fi | |
| # Navigate to the ComfyUI directory | |
| if cd "$COMFYUI_DIR"; then | |
| echo "Navigated to $COMFYUI_DIR" | |
| else | |
| echo "Error: Failed to navigate to $COMFYUI_DIR" | |
| exit 1 | |
| fi | |
| # Update the repository | |
| echo "Fetching and pulling the latest changes from Git..." | |
| if git fetch -p; then | |
| if git pull; then | |
| echo "Repository successfully updated." | |
| else | |
| echo "Warning: Failed to pull the latest changes from Git. Repository may not be up-to-date." | |
| fi | |
| else | |
| echo "Error: Failed to fetch repository updates." | |
| exit 1 | |
| fi | |
| # Run ComfyUI (adjust this based on the correct command) | |
| echo "Starting ComfyUI..." | |
| if python main.py; then # Adjust 'main.py' to the correct script if needed | |
| echo "ComfyUI started successfully." | |
| else | |
| echo "Error: Failed to start ComfyUI." | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment