ComfyUI > Nodes > ComfyUI > Load Optical Flow Model

ComfyUI Node: Load Optical Flow Model

Class Name

OpticalFlowLoader

Category
loaders
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Load Optical Flow Model Description

Facilitates loading optical flow models for motion analysis and video processing in ComfyUI framework.

Load Optical Flow Model:

The OpticalFlowLoader node is designed to facilitate the loading of optical flow models, specifically tailored for use with the RAFT-large format from torchvision. This node plays a crucial role in the ComfyUI framework by enabling the integration of pre-trained optical flow models, which are essential for tasks involving motion analysis and video processing. By loading these models offline, the node ensures that the necessary computational resources are efficiently utilized without the need for runtime downloads, thus enhancing the performance and reliability of the system. The primary goal of the OpticalFlowLoader is to provide a seamless and efficient way to incorporate advanced optical flow capabilities into your projects, allowing for improved temporal consistency and motion tracking in video-based applications.

Load Optical Flow Model Input Parameters:

model_name

The model_name parameter specifies the optical flow model to be loaded. It is a selection from the available models placed in the models/optical_flow/ directory. Currently, only the raft_large.pth model from torchvision is supported. This parameter is crucial as it determines which pre-trained model will be used for optical flow computations, impacting the accuracy and performance of the motion analysis. The available options are dynamically generated based on the files present in the specified directory, ensuring flexibility and ease of use.

Load Optical Flow Model Output Parameters:

OpticalFlow

The output parameter OpticalFlow represents the loaded optical flow model. This output is essential as it provides the necessary model object that can be used in subsequent nodes or processes within the ComfyUI framework. The loaded model is ready for use in tasks that require optical flow analysis, such as video processing and motion tracking, enabling enhanced temporal consistency and refined results.

Load Optical Flow Model Usage Tips:

  • Ensure that the raft_large.pth model file is correctly placed in the models/optical_flow/ directory before attempting to load it with the OpticalFlowLoader node. This will prevent any loading errors and ensure smooth operation.
  • Regularly update your optical flow models to take advantage of improvements and optimizations in newer versions, which can enhance the accuracy and efficiency of your video processing tasks.

Load Optical Flow Model Common Errors and Solutions:

Model file not found

  • Explanation: This error occurs when the specified model file is not present in the models/optical_flow/ directory.
  • Solution: Verify that the raft_large.pth file is correctly placed in the models/optical_flow/ directory and that the file name matches exactly with the expected input.

Unsupported model format

  • Explanation: This error arises if a model format other than raft_large.pth is attempted to be loaded.
  • Solution: Ensure that you are using the raft_large.pth model from torchvision, as it is the only supported format for the OpticalFlowLoader node at this time.

Load Optical Flow Model Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Load Optical Flow Model