ComfyUI Guide: Setting Up Workflows, Models, and Configuration

ComfyUI is a free, local application designed for generating AI-driven images and videos. It is tailored for users seeking granular control over the generation process, offering visibility into and adjustment of each stage. While this flexibility introduces a learning curve, this guide will assist you from initial setup to executing and customizing your first workflow.

Prerequisites for Getting Started

Operating ComfyUI requires a computer equipped with sufficient GPU resources to handle your chosen models and workflows. Heavier models and complex processes generally demand higher VRAM.

You must also acquire the specific model files required by your workflow. Depending on the setup, this may include checkpoints, diffusion models, VAEs, text encoders, LoRAs, or other components. These files are typically stored within the ComfyUI/models directory.

If local GPU resources are insufficient, you can execute ComfyUI on a remote GPU-powered desktop. This approach offloads the generation workload to the remote hardware while maintaining access from your standard computer.

Installing ComfyUI

For new users on Windows and macOS, ComfyUI recommends using the desktop application. Alternative installation methods exist, such as manual installation or the ComfyUI command-line tool, with the best choice depending on your specific operating system and environment.

Once installed, launch the application to access the interface. You will find the workflow canvas and the essential tools for creating and managing your workflows.

The Importance of ComfyUI Workflows

A ComfyUI workflow defines the entire generation pipeline for images or videos, controlling the models, settings, and processing steps that lead to the final output.

This offers significantly more control than a simple prompt-and-generate interface. You can swap models, integrate LoRAs, utilize input images, tweak generation parameters, upscale results, or insert additional processing stages.

Workflows are also reusable assets. Instead of recreating configurations from scratch, you can save effective setups and modify specific settings as needed. Additionally, you can download workflows from the community and adapt them to your local environment.

Anatomy of a ComfyUI Workflow

A workflow consists of interconnected nodes. Each node performs a specific function in the generation process, while the connections dictate the flow of information between them.

A standard text-to-image workflow typically includes nodes for loading the model, inputting the prompt, creating initial image data, executing generation, decoding the result, and saving the file.

  • Model loader: Initializes the model used for generation.
  • Text encoder: Translates the prompt into a format the model can process.
  • Sampler: Executes the generation process based on selected parameters.
  • VAE: Converts between latent space data and pixel image data.
  • Save Image: Writes the final image to storage.

You are not required to build every workflow from zero. ComfyUI offers built-in templates, and numerous community-created workflows are available for direct download and use.

Loading an Existing Workflow

Starting with an existing workflow is often the most efficient approach. ComfyUI includes examples for various models and tasks, and community platforms offer a vast array of additional options.

Many workflow images embed the workflow data within their metadata. You can load these by dragging the image into ComfyUI or selecting Workflows → Open. The workflow will render on the canvas with all nodes and settings pre-configured.

After loading, verify the expected models. If files are missing, ComfyUI can identify required models for supported templates. For other workflows, you may need to locate and install the necessary models manually.

Sourcing Models for ComfyUI

Models are available on repositories like Hugging Face and Civitai, or directly from the model creator's project page. The critical factor is ensuring the model is compatible with your intended workflow.

It is important to note that not all model files are universally compatible. Different architectures may require specific loaders and supporting files.

Before downloading any model, verify the following:

  • The model's architecture and version
  • The compatible ComfyUI workflow
  • The model file format
  • Recommended VRAM and hardware specifications
  • Necessary supporting files, such as VAEs, text encoders, or LoRAs
  • Licensing and usage restrictions

ComfyUI supports various model file types, each requiring a specific folder. For instance, checkpoints belong in models/checkpoints, LoRAs in models/loras, and VAEs in models/vae. Newer architectures may use directories like models/diffusion_models and models/text_encoders.

Installing Models

After downloading a model, place it in the directory expected by the workflow. You can then select it within the corresponding model loader node.

For example, a checkpoint might be located in:

ComfyUI/models/checkpoints/

A LoRA would typically reside in:

ComfyUI/models/loras/

If the new model does not appear in the list, refresh the interface or restart ComfyUI.

Installing Custom Nodes

Advanced workflows often rely on custom nodes not included in the base installation. Missing dependencies will appear as missing nodes in the workflow view.

The ComfyUI Manager simplifies the installation of these nodes. Alternatively, you can install them manually by placing the repositories in the custom_nodes directory and installing any required dependencies.

Exercise caution and only install custom nodes from trusted sources, as they contain executable code and may introduce their own dependencies and security implications.

Executing and Customizing Workflows

With models and custom nodes installed, review the key settings within the workflow, such as the model, prompt, image dimensions, and sampling parameters.

When ready, click the Queue button to initiate the process. ComfyUI will execute each step and generate the output defined by the workflow.

You can then modify individual components without reconstructing the entire workflow. Adjustments can include adding LoRAs, connecting input images, changing samplers, incorporating upscalers, or tweaking other settings to refine the result.

Saving Workflows

Save any workflow you plan to reuse. Note that a workflow file contains the node graph and settings but does not include the model files themselves. Keep a record of the specific models and custom nodes required for each workflow.

This is particularly crucial when migrating workflows to another computer or cloud desktop. You will likely need to install the same models and custom nodes to ensure the workflow functions correctly.

Try ComfyUI on DaDesktop

There is no need to purchase a new GPU solely to run ComfyUI. If your local hardware lacks sufficient resources, you can utilize a cloud desktop on-demand.

DaDesktop offers cloud desktops equipped with dedicated GPU resources, ideal for AI image and video generation workloads. You can install ComfyUI, download necessary models, and build workflows without adding hardware to your local machine.

Learn more about AI image and video generation on DaDesktop. You can also view the available GPUs and select a configuration suited to your models and workflows.

Start Your Free Trial Today

Run seamless virtual IT training with cloud-based labs, no downtime, just scalable learning that works.