torch tqdm numpy opencv-python cv2opencv-contrib-python

Introduces a node that tries to approximate the entire video using it’s first frame (that we stylize) by warping it using optical flow extracted from the video.
First we do image-to-image using the reference video’s first frame and a depth controlnet. The generated object doesn’t have to closely resemble the reference like on the demo. Then the generated image and the video frames are fed into the node and it returns a warped video. No ai models are used by the node. The example workflow uses SDXL but you can get it to work with any arch if you manage i2i.
pip install opencv-contrib-pythondiffusion_pytorch_model.fp16.safetensors from here and put it in models/controlnetAll node’s parameters below warp_smoothing are for DualTVL1 optical flow algorithm and are both hard to explain and not as useful as the rest, which are explained below.
Changing these does not make the node recompute the flow.