ComfyUI Tutorial 02 – ComfyUI Local Deployment

This entry is part 2 of 5 in the series ComfyUI Basic content

Welcome to the ComfyUI tutorial series! If you’re searching for a powerful and flexible user interface tool, Comfy UI is the perfect solution. This comprehensive series will guide you from beginner to expert, covering everything you need to know about designing, building, and optimizing with ComfyUI.

ComfyUI stands out as a favorite among developers due to its intuitive interface and customizable features. Whether you’re just starting or looking to master advanced functionalities, these tutorials are designed to help you quickly get started and enhance your productivity.

  • System Requirements for ComfyUI
  • How to Check Your GPU and Choose the Right One
  • Installing ComfyUI on Your Local Computer
  • Using Models from Other Stable Diffusion Folders in ComfyUI

Disclaimer: Since I am using a desktop computer with an NVIDIA GPU, the installation of SD Comfy UI is mainly based on desktop computers with NVIDIA graphics cards. For other systems like mac OS, I will provide the official installation guide URL, and please refer to it for installation


Installation is very simple. Comfy UI developers have made it more user-friendly by providing a one-click installer. You can go to the following release page, directly download the Windows standalone installer, decompress it, and use it immediately.

Note, I will not be providing pre-integrated installation packages from advanced users. Instead, I will guide you step by step on how to set up and customize your own SD Comfy UI software. This way, you’ll learn how to build and refine your installation for optimal performance and customization.

This way, when you use Comfy UI in the future, you’ll have a much better understanding of how to work with it and customize it to suit your needs. By learning the installation process step by step, you’ll gain deeper insight into the software’s functionality, making it easier to troubleshoot and adapt it to your specific requirements.

Click on “Direct link to download” to download the ComfyUI installation zip file, which is 1.45GB in size. Please note that it does not include any models, so the package itself is relatively small. You’ll need to add models separately after installation.

Once the download is complete, you will have a compressed zip file containing the ComfyUI installation files. You can then proceed to extract the contents of the zip file to a folder on your computer to begin the installation process.

Extract the compressed file to a hard drive with sufficient space, ideally to the root directory or a custom folder you’ve created. Once the extraction is complete, you should see the folder structure as shown in the image below.

At this point, the ComfyUI local installation is complete! You can now proceed to launch and configure ComfyUI to start using it. Enjoy exploring its features and customizing your workflows!

To start ComfyUI, simply double-click on the “run_nvidia_gpu.bat” file. This will launch Comfy UI and open the interface, allowing you to begin using the software.

The startup speed is relatively fast. After a brief wait, your browser page should automatically open and display the ComfyUI interface, ready for use. If it doesn’t open automatically, you can manually navigate to http://localhost:5000 in your browser to access the ComfyUI interface.

At this point, you have successfully opened ComfyUI! You can now start exploring its features, setting up workflows, and utilizing various models to generate images. Enjoy working with your new setup!

As mentioned earlier, the ComfyUI one-click installer does not include any models. Therefore, you will need to install the models that you want to use separately. You can either download pre-trained models from various sources or use custom models you already have.

Here’s how to install models:

  1. Download a Model: You can download models from sites like Hugging Face, Civitai, or other repositories that host Stable Diffusion models.
  2. Place the Model in the Correct Folder: After downloading, copy the model file (e.g., .ckpt or .safetensors) into the models folder within your ComfyUI directory.
  3. Select the Model in ComfyUI: Open the Comfy UI interface and choose the model you added from the available options.

Once the model is properly placed and selected, you can begin generating images using that model in your ComfyUI setup.

Open the following folder, and you will see that it is quite similar to WebUI. The difference is that you simply need to download the models and place them in the corresponding directories.

For example:

  1. Navigate to the models folder in your ComfyUI directory.
  2. Inside, you will find different subfolders like Stable-diffusion, VAE, or others, depending on the model types.
  3. Download your model (e.g., .ckpt, .safetensors, or other formats).
  4. Place the model file in the appropriate subfolder within the models directory.

Once the model is in place, you can go into Comfy UI and select it to use for generating images.

To add the large models from the tutorial, download them and place them in the ComfyUI/models/checkpoints folder. This folder is dedicated to storing the main Stable Diffusion models.

Here’s how to do it:

  1. Download the Model: Obtain the large model (e.g., .ckpt or .safetensors file) from your chosen source.
  2. Place the Model: Move or copy the downloaded model file into the ComfyUI/models/checkpoints folder.
  3. Select the Model: Once the model is in the correct folder, open ComfyUI, and the model should now be available for selection in your workflows.

All the basic large models should go into this checkpoints folder for ComfyUI to recognize and use them.

At this point, you might be wondering: “What if I’ve already installed WebUI and don’t want to delete it? Do I really need to copy each model twice, which would take up too much space?”

Don’t worry! The ComfyUI developers have already thought of this. You can avoid duplicating models by linking them between WebUI and ComfyUI.

If you have WebUI installed, follow these steps:

  1. Navigate to the following directory in ComfyUI:
    1. ComfyUI/models/checkpoints
  2. Instead of copying the models again, you can create symbolic links (symlinks) to the models from your WebUI installation folder.

For example, if your WebUI models are in stable-diffusion-webui/models/Stable-diffusion, you can create a symlink from that location to the ComfyUI/models/checkpoints folder.

For users who haven’t installed WebUI, you can skip this step since you won’t have to worry about linking models.

This way, both ComfyUI and WebUI can access the same models without taking up extra disk space.

Find the file named “extra_model_paths.yaml.example”, right-click on it, and select “Rename”. Then, delete the “.example” part of the filename, leaving it as “extra_model_paths.yaml”.

This step will allow ComfyUI to recognize the file and use it to configure additional model paths, such as linking models from your WebUI folder.

Next, open the “extra_model_paths.yaml” file using a text editor, such as Notepad (Windows), TextEdit (macOS), or any other code editor (e.g., VS Code, Sublime Text).

In this file, you will configure the paths for additional models, allowing ComfyUI to access models stored in other directories, such as those used by WebUI.

Replace it with the actual path to your WebUI installation directory.

Make sure to provide the correct file path to the folder where WebUI is installed, so Comfy UI can properly link to the models stored there. After updating, save the file.

Restart the Comfy UI after making changes to the “extra_model_paths.yaml” file. After restarting, it will automatically load the model from the local WebUI installation.

Now, all the models from your WebUI setup will be available in Comfy UI, and you won’t need to duplicate them in both locations. Enjoy working with your models across both interfaces!

A common mistake to watch out for when entering your WebUI address is the use of backslashes (\) vs. forward slashes (/).

When specifying the path, you should use forward slashes instead of backslashes.

For example:

  • Correct format: G:/SD/…
  • Incorrect format: G:\SD\…

Make sure to use forward slashes (/) when editing the path in the “extra_model_paths.yaml” file to avoid errors and ensure ComfyUI can properly access your models.

At this point, all the installation work is complete! You can now start designing your own text-to-image workflow in ComfyUI.

With the model set up and linked correctly, you can start customizing your workflow, experimenting with different Settings, and creating stunning images using steady diffusion. Enjoy exploring and creating!

In the “ComfyUI\update” folder, you will find two files: “update_comfyui” and “update_comfyui_and_python_dependencies”. These are used for updating ComfyUI and configuring the environment.

  • To update the Comfy UI, click the “update_comfyui” file.
  • Once you see the message “Done”, it means the update was successful.

This process ensures that your Comfy UI installation is up to date with the latest features and improvements.

Share this content:

Series Navigation<< ComfyUI Tutorial 01 – A Comprehensive Overview of AIGCComfyUI Tutorial 03 – Demonstration of Drawing a Little Girl >>

Post Comment