ComfyUI Install and Usage Guide - Stable Diffusion

3 min read 1 month ago
Published on Aug 03, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial provides a step-by-step guide on how to install and use ComfyUI for stable diffusion image generation. ComfyUI offers a powerful and flexible interface that allows users to create and manage workflows for generating unique AI art. By following these instructions, you'll be able to set up ComfyUI on your system and start generating images efficiently.

Step 1: Download and Install Python

  1. Visit the Python downloads page.
  2. Download the Python 3.10.10 Windows installer (64-bit).
  3. Once downloaded, double-click the installer.
  4. If you already have Python installed, choose "Modify" instead of "Install."
  5. Make sure to check the box for "Add Python to environment variables" during installation.
  6. Complete the installation by following the default options.

Step 2: Download and Install Git

  1. Go to the Git downloads page.
  2. Download the 64-bit Git installer.
  3. After downloading, run the installer and click "Next" through the setup process, accepting all default options.
  4. Complete the installation.

Step 3: Download and Install ComfyUI

  1. Navigate to the ComfyUI GitHub page.
  2. Click the link to download the ComfyUI 7zip file (approximately 1.3 GB).
  3. Use a tool like WinRAR to extract the contents to a new directory (e.g., E:\ComfyUI).
  4. Inside the extracted folder, locate and run the run Nvidia GPU.bat file to start ComfyUI.

Step 4: Configure ComfyUI

  1. After running the batch file, the ComfyUI will open in your browser at http://127.0.0.1:8188.
  2. Load a checkpoint model:
    • Go to the models directory and drop your Stable Diffusion models (e.g., from Hugging Face).
    • Select a model from the left panel.
  3. Enter your prompts:
    • Positive prompt: Describe what you want to generate (e.g., "beautiful scenery, nature, glass bottle").
    • Negative prompt: Specify what to avoid.
  4. Adjust image settings:
    • Change dimensions to 1240 x 1024.
    • Set batch size to 1.
    • Choose a sampler name (e.g., Euler, DPM).
  5. Click "Q prompt" to generate your first image.

Step 5: Install ComfyUI Manager

  1. Navigate to your ComfyUI custom nodes directory using Command Prompt:
    • cd E:\ComfyUI\custom_nodes
  2. Clone the ComfyUI Manager repository:
    git clone https://github.com/ltdrdata/ComfyUI-Manager.git
    
  3. Restart ComfyUI by running the run Nvidia GPU.bat file again.

Step 6: Using ComfyUI Manager

  1. After restarting, a new "Manager" tab will appear in ComfyUI.
  2. Use this tab to install, remove, or enable custom nodes.
  3. Visit Comfy Workflows to find and install advanced workflows.
  4. Download any desired workflow's JSON configuration file.
  5. In ComfyUI, go to "Load" and select the downloaded JSON file.
  6. If prompted about missing nodes, use the Manager to install them.
  7. Restart ComfyUI again to apply changes.

Conclusion

By following the steps outlined in this tutorial, you will have successfully installed ComfyUI and configured it for generating images using Stable Diffusion. You can explore various workflows and enhance your creative projects with the custom nodes available through the ComfyUI Manager. Experiment with different prompts and models to discover the full potential of this powerful tool. Happy generating!