Mastering ComfyUI: Setup, Workflows, and Model Management

ComfyUI is a free, local application designed for generating AI-driven images and videos directly on your hardware. It is tailored for users seeking granular control over the generation process, going beyond the simplicity of standard prompt-and-generate tools by allowing visibility into and adjustment of every stage. While this flexibility introduces a learning curve, this guide provides a comprehensive pathway from initial installation to executing and refining your first workflow.

Prerequisites for Getting Started

To utilize ComfyUI effectively, your computer must have sufficient GPU resources to support the specific models and workflows you intend to use. More complex models and demanding workflows typically necessitate higher VRAM capacity.

Additionally, you must possess the necessary model files required by your workflow. Depending on the architecture, these may include checkpoints, diffusion models, VAEs, text encoders, LoRAs, or other components. These files are conventionally stored within the ComfyUI/models directory.

If your local hardware lacks the necessary GPU capabilities, consider running ComfyUI on a remote, GPU-powered desktop. This approach shifts the computational workload to the remote GPU while still allowing you to manage the application from your regular computer.

Installing ComfyUI

For users on Windows and macOS, ComfyUI recommends its desktop application for a streamlined setup experience. Alternative methods, such as manual installation or using the ComfyUI command-line tool, are also available, with the best choice depending on your specific operating system and technical setup.

Once installation is complete, launch the application to access the interface. You will be greeted by the workflow canvas and the toolkit required for creating and managing your generation pipelines.

The Importance of ComfyUI Workflows

In ComfyUI, a workflow dictates the precise method for generating images or videos. It governs the models, configuration settings, and processing steps that culminate in the final output.

This structure offers significantly greater control compared to a simple text prompt box. You can swap 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. Rather than reconstructing the same setup repeatedly, you can save a workflow that yields satisfactory results and modify specific settings when necessary. The platform also supports downloading workflows created by the community, allowing you to adapt them to your own environment.

Anatomy of a ComfyUI Workflow

A workflow consists of interconnected nodes. Each node performs a specific function within the generation pipeline, while the connections between them dictate the flow of data.

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

  • Model loader: Responsible for loading the base model used for generation.
  • Text encoder: Translates the text prompt into a format the model can interpret.
  • Sampler: Executes the generation process based on the selected settings.
  • VAE: Facilitates the conversion between latent data and visible image pixels.
  • Save Image: Writes the final generated image to your disk.

There is no need to construct every workflow from scratch. ComfyUI offers built-in templates, and a vast library of community-created workflows is available for download and immediate use.

Loading Existing Workflows

Utilizing an existing workflow is often the most efficient way to begin. ComfyUI includes example workflows for various models and tasks, and community platforms provide an even wider array of options.

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

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

Locating Models for ComfyUI

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

It is important not to assume universal compatibility; different model architectures often require specific loaders and supporting files.

Before downloading any model, verify the following details:

  • The model's architecture and version
  • The required ComfyUI workflow configuration
  • The specific 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 file types, each with a designated storage location. For instance, checkpoints reside in models/checkpoints, LoRAs in models/loras, and VAEs in models/vae. Newer models may utilize directories such as models/diffusion_models and models/text_encoders.

Installing a Model

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

For example, a checkpoint should be stored in:

ComfyUI/models/checkpoints/

Conversely, a LoRA would typically be stored in:

ComfyUI/models/loras/

If a newly installed model does not appear in the selection list, refresh the interface or restart ComfyUI to recognize the change.

Installing Custom Nodes

Advanced ComfyUI workflows often rely on custom nodes that are not part of the standard installation. If these dependencies are missing, the workflow will display missing node indicators.

ComfyUI includes a Manager feature to facilitate the installation of custom nodes. Alternatively, you can install them manually by placing their repositories in the custom_nodes directory and installing their required dependencies.

Exercise caution and only install custom nodes from trusted sources. These nodes contain executable code and may introduce their own dependencies and security considerations.

Executing and Modifying Workflows

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

When everything is prepared, click the Queue button to initiate the workflow. ComfyUI will process each step sequentially to produce the defined output.

You can subsequently modify individual components of the workflow without rebuilding it from scratch. This includes adding LoRAs, connecting input images, changing samplers, inserting upscalers, or adjusting other settings to refine the result.

Saving Your Workflows

It is best practice to save workflows you intend to reuse. A workflow file contains the node graph and its settings but does not inherently include the model files themselves. Keep a record of which models and custom nodes each workflow requires.

This is particularly important 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 runs correctly in the new environment.

Try ComfyUI on DaDesktop

You do not need to purchase a new GPU solely to run ComfyUI. If your current computer lacks sufficient GPU resources, you can opt to run ComfyUI on a cloud desktop instead, accessing it only when needed.

DaDesktop offers cloud desktops equipped with dedicated GPU resources, ideal for workloads such as AI image and video generation. This allows you to install ComfyUI, download preferred models, and build custom workflows without the need to upgrade your local hardware.

Learn more about AI image and video generation on DaDesktop. You can also view the available GPUs and select a configuration that suits your specific models and workflow requirements.

Start Your Free Trial Today

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