How to Use ComfyUI: Workflows, Models, and Setup

ComfyUI is a complimentary application designed for generating AI-driven images and videos locally on your personal hardware. It is tailored for users seeking greater precision than standard prompt-based tools offer, enabling you to visualize and fine-tune every stage of the generation pipeline. While this level of flexibility introduces a learning curve, this guide will assist you in getting started, covering everything from initial installation to executing and adjusting your first workflow.

Prerequisites for Getting Started

ComfyUI requires a computer equipped with sufficient GPU resources to handle the specific models and workflows you intend to execute. More complex models and intensive workflows typically demand higher VRAM capacity.

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

If your local GPU is not suitable for your needs, you can alternatively run ComfyUI on a remote GPU-powered desktop. This approach offloads the generation workload to the remote GPU while allowing you to access the environment from your standard computer.

Installing ComfyUI

For Windows and macOS users, ComfyUI recommends its desktop application as the preferred starting point for newcomers. Alternative installation methods, such as manual setup or utilizing the ComfyUI command-line tool, are also available. The best approach depends on your specific operating system and configuration.

After successfully installing ComfyUI, launch the application and open the interface. You will see the workflow canvas along with the tools required to create and manage your workflows.

The Importance of ComfyUI Workflows

A ComfyUI workflow defines the precise method by which an image or video is generated. It governs the models, settings, and processing steps employed to produce the final output.

This offers significantly more control than a simple prompt box. You can swap models, incorporate a LoRA, utilize an input image, tweak generation parameters, upscale the result, or integrate additional processing steps.

Workflows can be saved and reused. Rather than reconstructing the same setup repeatedly, you can maintain a workflow that yields desired results and modify individual settings as needed. Additionally, you can download workflows created by other users and adapt them to your own configuration.

Understanding a ComfyUI Workflow

A workflow consists of interconnected nodes. Each node manages a specific aspect of the generation process, and the connections determine how data flows between them.

A basic text-to-image workflow might include nodes for loading a model, entering a prompt, creating initial image data, generating the image, decoding the result, and saving it.

  • Model loader: Loads the model used for generation.
  • Text encoder: Converts your prompt into information the model can use.
  • Sampler: Runs the generation process using the selected settings.
  • VAE: Converts between latent data and an image.
  • Save Image: Writes the generated image to disk.

You are not required to build every workflow from scratch. ComfyUI offers workflow templates, and numerous community-created workflows can be downloaded and opened directly.

Loading an Existing Workflow

Using an existing workflow is often the simplest way to begin. ComfyUI provides example workflows for various models and tasks, and community sites offer many more options.

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

Once the workflow is loaded, verify which models it expects. If required files are missing, ComfyUI can identify missing models for supported workflow templates. Other workflows may require you to locate and install the models independently.

Finding Models for ComfyUI

Models can be sourced from repositories such as Hugging Face and Civitai, as well as from the model's own project page. The critical factor is identifying a model that is compatible with the workflow you wish to use.

Do not assume that any model file can be loaded into any workflow. Different model architectures may require different loaders and supporting files.

Before downloading a model, verify:

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

ComfyUI supports various types of model files. The target folder depends on the type of model being installed. For example, checkpoints can be placed in models/checkpoints, LoRAs in models/loras, and VAEs in models/vae. Some newer models use 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 the workflow. You can then select it in the corresponding model loader.

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 utilize custom nodes that are not included in the standard installation. A workflow may indicate missing nodes if these dependencies have not been installed.

ComfyUI provides a Manager for installing custom nodes. Nodes can also be installed manually by placing their repositories in the custom_nodes directory and installing their required dependencies.

Only install custom nodes from sources you trust. Custom nodes can contain executable code and may have their own dependencies and security considerations.

Running and Modifying Your Workflow

Once the required models and custom nodes are installed, review the important settings in the workflow. Start with the model, prompt, image dimensions, and sampling settings.

When everything is ready, use the Queue button to run the workflow. ComfyUI processes each step and produces the output defined by the workflow.

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

Saving Your Workflows

Save workflows that you intend to reuse. A workflow contains the node graph and its settings, but it does not necessarily contain the model files themselves. Keep track of which models and custom nodes the workflow requires.

This becomes especially important when moving a workflow to another computer or cloud desktop. You may need to install the same models and custom nodes before the workflow will run correctly.

Try ComfyUI on DaDesktop

You do not need to purchase a new GPU just to run ComfyUI. If your current computer does not have enough GPU resources, you can run ComfyUI on a cloud desktop instead and use it when you need it.

DaDesktop provides cloud desktops with dedicated GPU resources for workloads such as AI image and video generation. You can install ComfyUI, download the models you want, and build your own workflows without adding a dedicated GPU to your local computer.

Learn more about AI image and video generation on DaDesktop. You can also view the available GPUs and choose a configuration based on the models and workflows you want to run.

Start Your Free Trial Today

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