maximize-your-system-comfyui-on-ubuntu-24-04-without-a-gpu-2100x700

Maximize Your System: ComfyUI on Ubuntu 24.04 Without a GPU

ComfyUI provides an intuitive, node-based interface for designing and executing advanced Stable Diffusion pipelines. This guide will walk you through installing ComfyUI on Ubuntu 24.04 LTS without a GPU, using Conda for environment management. This setup ensures you can run ComfyUI even if you don’t have a dedicated GPU.

Prerequisites

Before we begin, ensure that you have Ubuntu 24.04 LTS installed and updated. If you don’t have Conda installed, follow this guide on installing Conda on Ubuntu to set it up.

Step-by-Step Installation

Step 1: Install Conda

If Conda is not already installed, follow the instructions provided in the Conda installation guide. Once installed, you can proceed with creating a Conda environment for ComfyUI.

Step 2: Create a Conda Environment

Open a terminal and create a new Conda environment specifically for ComfyUI. We’ll use Python 3.8 for this setup:

conda create -n comfyui python=3.8
conda activate comfyui

Step 3: Clone the ComfyUI Repository

Clone the ComfyUI repository from GitHub into a directory of your choice:

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

Step 4: Install Dependencies

Inside the ComfyUI directory, install the required Python packages using pip:

pip install -r requirements.txt

Step 5: Set Up Models

Create directories for your Stable Diffusion checkpoints and other models:

mkdir -p models/checkpoints models/vae

Copy your checkpoint files (e.g., .ckpt, .safetensors) into the models/checkpoints directory. If you have VAE models, place them in models/vae.

Here’s how your directory structure should look:

ComfyUI/
├── models/
│   ├── checkpoints/
│   │   ├── model.ckpt
│   │   └── model.safetensors
│   ├── vae/
│   │   └── vae_model.ckpt

Mandatory for Basic Use: Use either .ckpt or .safetensors for the main model files. You do not need both simultaneously.

Recommended for Enhanced Quality: Use VAE models for better image synthesis and inpainting.

Obtaining Checkpoint Files and VAE Models

  1. From Official Sources:
    • Hugging Face Model Hub: Hugging Face provides a wide range of models, including Stable Diffusion. You can find and download checkpoints and VAE models from the Hugging Face Model Hub.
  2. Community Sources:
    • Civitai: Civitai is a popular community platform where you can find various Stable Diffusion models and VAEs uploaded by other users. Visit Civitai and search for the specific models you need.

Step 6: Install the CPU Version of PyTorch

Install the CPU version of PyTorch using Conda:

conda install pytorch torchvision torchaudio cpuonly -c pytorch

Step 7: Running ComfyUI

After setting up the dependencies and models, you can run ComfyUI using the following command for CPU-only execution:

python main.py --cpu

This command ensures that ComfyUI runs on the CPU, making it suitable for systems without a GPU.

Conclusion

By following these steps, you should have ComfyUI installed and running on your Ubuntu 24.04 LTS system without a GPU. This setup leverages the power of Conda for environment management, ensuring a clean and efficient installation process. If you encounter any issues, refer to the troubleshooting section in the original content or check the ComfyUI GitHub page for further assistance. Enjoy designing your advanced Stable Diffusion workflows with ease!

Leave a Reply

Your email address will not be published. Required fields are marked *