Mastering ComfyUI: Setup, Workflows, and Model Management

ComfyUI is a complimentary application designed for generating AI-driven images and videos locally on your own hardware. It caters to users seeking greater control than standard prompt-based tools offer, providing full visibility into and adjustability of every step in the generation pipeline. While this flexibility introduces a learning curve, this guide will guide you through the essentials, from initial setup to executing and customizing your first workflow.

Prerequisites for Getting Started

To run ComfyUI effectively, your computer must possess sufficient GPU resources to handle the specific models and workflows you intend to use. More complex models and demanding workflows typically require higher amounts of VRAM.

Additionally, you must have access to the model files required by your workflow. Depending on the architecture, this may involve checkpoints, diffusion models, VAEs, text encoders, LoRAs, or other components. These files are generally stored within the ComfyUI/models directory.

If your local hardware lacks the necessary GPU power, you can alternatively run ComfyUI on a remote GPU-enabled desktop. This approach offloads the heavy processing to the remote GPU while allowing you to interact with the interface from your standard computer.

Installing ComfyUI

For users on Windows and macOS, ComfyUI recommends its desktop application for new starters. However, other installation options exist, such as manual installation or using the ComfyUI command-line tool. The best method depends on your specific operating system and configuration.

Once installed, launch the application and open the interface. You will immediately see the workflow canvas along with the tools available for creating and managing your workflows.

The Importance of ComfyUI Workflows

A ComfyUI workflow dictates how an image or video is generated. It governs the selection of models, settings, and the sequence of processing steps that lead to the final output.

This structure provides significantly more control than a simple prompt box. You have the ability to switch models, integrate LoRAs, use input images, tweak generation parameters, upscale results, or insert additional processing steps.

Workflows are also designed to be saved and reused. Instead of recreating the same setup repeatedly, you can retain a workflow that yields satisfactory results and adjust individual settings as needed. Furthermore, you can download workflows created by the community and adapt them to your specific requirements.

Anatomy of a ComfyUI Workflow

At its core, a workflow consists of connected nodes. Each node performs a specific function within the generation process, and the connections define how data flows between them.

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

  • Model loader: Loads the specific model used for generation.
  • Text encoder: Translates your prompt into data usable by the model.
  • Sampler: Executes the generation process based on the selected settings.
  • VAE: Converts between latent data and visible image data.
  • Save Image: Writes the final generated image to your disk.

You are not required to build every workflow from scratch. ComfyUI offers workflow 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 straightforward approach. ComfyUI includes example workflows for various models and tasks, and community platforms offer an extensive library of options.

Many workflow images embed the workflow data within their metadata. You can simply drag the image into ComfyUI or use Workflows → Open to load it. The workflow will then appear on the canvas with all nodes and settings pre-configured.

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

Sourcing Models for ComfyUI

Models can be found on repositories like Hugging Face and Civitai, as well as on the specific project pages for the models. The key is to ensure the model is compatible with the workflow you intend to use.

It is important not to assume that any model file will work with any workflow. Different model architectures often require specific loaders and supporting files.

Before downloading a model, consider the following:

  • The model architecture and version
  • The required ComfyUI workflow
  • The model file format
  • Recommended VRAM and hardware specifications
  • Any necessary VAE, text encoder, LoRA, or other supporting files
  • The model's license and usage restrictions

ComfyUI supports various types of model files, and the correct folder depends on the file type. For instance, checkpoints are placed in models/checkpoints, LoRAs in models/loras, and VAEs in models/vae. Newer models may utilize folders such as models/diffusion_models and models/text_encoders.

Installing a Model

Once you have downloaded a model, place it in the directory expected by your workflow. You can then select it within the corresponding model loader node.

For example, a checkpoint might be stored in:

ComfyUI/models/checkpoints/

A LoRA might instead be stored in:

ComfyUI/models/loras/

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

Installing Custom Nodes

Many advanced ComfyUI workflows rely on custom nodes that are not part of the standard installation. If these dependencies are missing, the workflow may display missing nodes.

ComfyUI includes a Manager for installing custom nodes. Alternatively, nodes can be installed manually by placing their repositories in the custom_nodes directory and installing their required dependencies.

Only install custom nodes from trusted sources. Since custom nodes can contain executable code, they may have their own dependencies and security considerations.

Running and Modifying Your Workflow

Once all required models and custom nodes are installed, review the critical settings in your workflow. Begin by checking the model, prompt, image dimensions, and sampling parameters.

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

You can then tweak individual parts of the workflow without rebuilding it from scratch. Add a LoRA, connect an input image, change the sampler, add an upscaler, or adjust other settings to refine the result.

Saving Your Workflows

Save workflows you plan to reuse. A workflow contains the node graph and its settings but does not necessarily include the model files themselves. Keep track of which models and custom nodes are required for each workflow.

This is particularly important when transferring a workflow to another computer or cloud desktop. You may need to install the same models and custom nodes before the workflow will function correctly.

Try ComfyUI on DaDesktop

You do not need to purchase a new GPU just to run ComfyUI. If your current computer lacks sufficient GPU resources, you can run ComfyUI on a cloud desktop and access it when needed.

DaDesktop provides cloud desktops equipped with dedicated GPU resources for workloads such as AI image and video generation. You can install ComfyUI, download your preferred models, and build custom workflows without adding a dedicated GPU 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 based on the models and workflows you wish to run.

Start Your Free Trial Today

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