ComfyUI Guide: Mastering Workflows, Models, and Setup

ComfyUI serves as a free, local solution for generating AI-driven images and videos directly on your hardware. Designed for users seeking deeper control than standard prompt-based tools, it offers full visibility into and adjustment of every step in the generation pipeline. While this flexibility introduces a learning curve, this guide will walk you through the process—from initial setup to executing and customizing your first workflow.

Prerequisites for Getting Started

To run ComfyUI effectively, your computer requires sufficient GPU resources to handle the specific models and workflows you plan to use. Heavier models and complex workflows typically demand higher VRAM.

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

If your local hardware lacks the necessary GPU power, you have the option to run ComfyUI on a remote GPU-equipped desktop. This setup shifts the computational load to the remote machine while allowing you to access the interface from your regular computer.

Installing ComfyUI

For Windows and macOS users, ComfyUI recommends utilizing its dedicated desktop application as the simplest entry point. Alternative installation methods, such as manual installation or using the command-line tool, are also available, with the best choice depending on your specific operating system and configuration.

Once installed, launch the application to access the interface. Here, you will find the workflow canvas along with the essential tools for creating and managing your projects.

The Importance of ComfyUI Workflows

In ComfyUI, a workflow dictates the precise methodology for generating an image or video. It governs the selection of models, specific settings, and the sequence of processing steps required to achieve the final output.

This approach offers significantly greater control compared to a simple prompt box. You have the ability to switch models, integrate LoRAs, utilize input images, tweak generation parameters, apply upscaling, or insert additional processing steps as needed.

Furthermore, workflows are designed for persistence and reuse. Instead of reconstructing the same configuration repeatedly, you can retain a workflow that yields satisfactory results and modify individual settings when necessary. You can also leverage workflows created by the community, adapting them to fit your specific environment.

Understanding ComfyUI Workflows

A workflow consists of interconnected nodes. Each node performs a specific function within the generation pipeline, and the connections between them determine the flow of information.

A standard text-to-image workflow might include nodes for loading the model, processing the prompt, initializing image data, executing generation, decoding the result, and saving the final file.

  • Model loader: Retrieves the model used for the generation process.
  • Text encoder: Translates the text prompt into a format the model can interpret.
  • Sampler: Executes the generation process based on the selected parameters.
  • VAE: Facilitates the conversion between latent data and the final image.
  • Save Image: Writes the completed image to your storage device.

There is no requirement to build every workflow from the ground up. ComfyUI offers built-in templates, and a vast library of community-created workflows is available for direct download and integration.

Loading an Existing Workflow

Utilizing an existing workflow is often the most efficient way to begin. ComfyUI includes sample workflows for various models and tasks, and community platforms host an extensive collection of additional examples.

Frequently, workflow data is embedded in the metadata of workflow images. You can simply drag the image into the ComfyUI interface or use the Workflows → Open menu to load it. The workflow will then appear on the canvas with all nodes and settings pre-configured.

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

Sourcing Models for ComfyUI

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

It is important not to assume that any model file is universally compatible. Different model architectures often require specific loaders and supporting files.

Before downloading a model, verify the following:

  • The model's architecture and version
  • The specific ComfyUI workflow it is designed for
  • The file format of the model
  • Recommended VRAM and hardware specifications
  • Any additional required files, such as VAEs, text encoders, or LoRAs
  • The model's license terms and usage restrictions

ComfyUI supports various types of model files, with storage locations depending on the model 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 a model is downloaded, place it in the directory expected by the workflow. You can then select it using the corresponding model loader within the interface.

For example, a checkpoint should be stored in:

ComfyUI/models/checkpoints/

A LoRA file, on the other hand, belongs in:

ComfyUI/models/loras/

If the newly installed model does not appear in the model list, refresh the interface or restart ComfyUI to update the cache.

Installing Custom Nodes

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

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

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

Running and Modifying Your Workflow

With all required models and custom nodes installed, review the key settings within the workflow. Focus first on the model selection, prompt, image dimensions, and sampling parameters.

Once everything is configured, use the Queue button to execute the workflow. ComfyUI will process each step and generate the output defined by the workflow structure.

You can then fine-tune individual components without reconstructing the entire workflow. This includes adding LoRAs, connecting input images, changing samplers, applying upscalers, or adjusting other settings to refine the result.

Saving Your Workflows

Save workflows you intend to reuse. A saved workflow contains the node graph and its settings, but it does not include the model files themselves. It is essential to keep track of the specific models and custom nodes each workflow requires.

This is particularly important when transferring a workflow to another computer or cloud environment. You may need to install the same models and custom nodes on the new system to ensure the workflow runs correctly.

Experience ComfyUI on DaDesktop

There is no need to purchase a new GPU solely to run ComfyUI. If your current hardware lacks sufficient GPU resources, you can run ComfyUI on a cloud desktop and access it whenever required.

DaDesktop offers cloud desktops equipped with dedicated GPU resources, ideal for workloads like AI image and video generation. You can install ComfyUI, download your preferred models, and build custom workflows without adding dedicated GPU 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 that aligns with your specific models and workflows.

Start Your Free Trial Today

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