Mastering ComfyUI: Workflows, Models, and Setup

ComfyUI is a complimentary software solution that enables local generation of AI images and videos on your personal hardware. It is designed for users seeking greater precision than standard prompt-based tools offer, providing full visibility and control over each stage of the generation process. While this flexibility introduces a learning curve, this guide will support you from the initial installation through to executing and customising your first workflow.

Prerequisites

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

You will also need the specific model files required 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 housed within the ComfyUI/models directory.

If your local hardware lacks the necessary GPU capability, you can opt to run ComfyUI on a remote GPU-powered desktop. This approach offloads the generation workload to the remote GPU while allowing you to access the interface from your regular computer.

Installing ComfyUI

For users on Windows and macOS, ComfyUI recommends its dedicated desktop application for the smoothest onboarding experience. Alternative installation methods, such as manual setup or the ComfyUI command-line tool, are also available and may be preferable depending on your operating system and specific configuration.

Once installation is complete, launch the application to access the interface. You will find 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 methodology for generating an image or video. It dictates the models, settings, and processing steps used to achieve the final output.

This architecture offers significantly more control than a simple prompt box. You can swap models, integrate LoRAs, use input images, fine-tune generation parameters, upscale results, or introduce additional processing stages.

Workflows are also designed for retention and reuse. Rather than reconstructing the same setup repeatedly, you can maintain a workflow that yields satisfactory results and adjust individual settings as needed. Additionally, you can download workflows created by the community and adapt them to suit your own environment.

Understanding ComfyUI Workflows

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

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

  • Model loader: Loads the specific model required for generation.
  • Text encoder: Translates your prompt into a format the model can interpret.
  • Sampler: Executes the generation process based on the selected settings.
  • VAE: Converts between latent data and the final image format.
  • Save Image: Writes the generated image to your local disk.

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

Loading an Existing Workflow

Utilising an existing workflow is often the most efficient way to begin. ComfyUI provides sample workflows for various models and tasks, and community platforms host 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 appear on the canvas with all nodes and settings pre-configured.

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

Sourcing Models for ComfyUI

Models are commonly found on repositories such as Hugging Face and Civitai, or on the project pages associated with the specific model. The critical factor is ensuring the model is compatible with your intended workflow.

Do not assume that any model file will function 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 compatibility
  • The model file format
  • Recommended VRAM and hardware specifications
  • Any required VAE, text encoder, LoRA, or other supporting files
  • The model's licence terms and usage restrictions

ComfyUI supports various model file types, with storage locations dependent on the model type. For instance, checkpoints are placed in models/checkpoints, LoRAs in models/loras, and VAEs in models/vae. Some newer models utilise folders 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 within the corresponding model loader node.

For example, a checkpoint might be stored in:

ComfyUI/models/checkpoints/

Whereas a LoRA might be stored in:

ComfyUI/models/loras/

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

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 node warnings.

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 any required dependencies.

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

Running and Modifying Your Workflow

Once the necessary 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 configured, click the Queue button to execute the workflow. ComfyUI will process each step and produce the output as defined by the workflow structure.

You can subsequently modify individual components of the workflow without reconstructing it. Adding a LoRA, connecting an input image, changing the sampler, adding an upscaler, or adjusting other settings allows you to refine the result.

Saving Your Workflows

Save workflows that you intend to reuse. A workflow file contains the node graph and its settings, but it does not typically include the model files themselves. Ensure you keep a record of which models and custom nodes the workflow requires.

This is particularly important when transferring a workflow to another computer or cloud desktop. You will likely need to install the same models and custom nodes before the workflow will run correctly in the new environment.

Try ComfyUI on DaDesktop

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

DaDesktop provides cloud desktops equipped with dedicated GPU resources, ideal for workloads such as AI image and video generation. You can install ComfyUI, download your desired models, and build your 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 tailored to 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.