This package contains three nodes to help you compute optical flow between pairs of images, usually adjacent frames in a video, visualize the flow, and apply the flow to another image of the same dimensions. Most of the code is from Deforum, so this is released under the same license (MIT).
https://github.com/seanlynch/comfyui-optical-flow
git clone https://github.com/seanlynch/comfyui-optical-flow
comfy node install comfyui-optical-flow