in English
ComfyUI has a custom node called Frame-Interpolation that interpolates between video frames to smooth the video.
Fannovel16/ComfyUI-Frame-Interpolation: A custom node set for Video Frame Interpolation in ComfyUI.
A custom node set for Video Frame Interpolation in ComfyUI. - Fannovel16/ComfyUI-Frame-Interpolation
Using this, you can smooth out the movement of videos created on a WAN or other device.
1. How to use
Connect the RIFE-VFI nodes of the custom node as follows:
A collection of images for each frame needs to be connected to the RIFE-VFI node, so for example, if a video is generated over a WAN, the images are connected before being converted to mp4 or similar.
If you want to connect something that is already a video, you can load the video using the VHS_LoadVideo node of the custom node ComfyUI-VideoHelperSuite and connect it as shown in the image below.
Kosinkadink/ComfyUI-VideoHelperSuite: Nodes related to video workflows
Nodes related to video workflows. Contribute to Kosinkadink/ComfyUI-VideoHelperSuite development by creating an account on GitHub.
2. Try it out
This time, we will load a webp video that was generated in advance on WAN and perform frame interpolation. Connect it as follows.
The multiplier value of the RIFE VFI node is the number of frames to add between images. A value of 2 will double the number of frames in the video.
When saving a video, you need to set the fps to take into account the increased number of frames. If the number of frames in the video doubles, you need to double the fps value as well, otherwise the video will look like slow motion.
The video actually output with a multiplier of 2 is shown below. The left is the original video (fps = 16), and the right is the video with twice the frame rate (fps = 32).


Can you see that it's a little smoother?
If you set multiplier to 4, it will look like this:
Maybe it's a feature of this blog, but when I uploaded it, it was slow.
With fps exceeding 60, the smoothness of the movement is significantly improved. However, there are cases where the sense of afterimage becomes stronger, so you should be careful with the parameters.
日本語解説(in Japanese)
ComfyUI には動画のフレーム間を補完して映像を滑らかにする Frame-Interpolation というカスタムノードがあります。
Fannovel16/ComfyUI-Frame-Interpolation: A custom node set for Video Frame Interpolation in ComfyUI.
A custom node set for Video Frame Interpolation in ComfyUI. - Fannovel16/ComfyUI-Frame-Interpolation
これを使用すれば、WANなどで作った動画の動きを滑らかにすることができます。
1.使い方
カスタムノードの RIFE-VFI ノードを以下のように繋げます。
1フレーム毎に画像になっている集合を RIFE-VFI ノードに繋げる必要があるため、例えば WAN で動画を生成した場合なら mp4 などに変換する前の images を繋げます。
すでに動画になっているものを繋げたい場合は、カスタムノード ComfyUI-VideoHelperSuite の VHS_LoadVideo ノードで動画を読み込めば、下の画像のようにそのまま接続することができます。
Kosinkadink/ComfyUI-VideoHelperSuite: Nodes related to video workflows
Nodes related to video workflows. Contribute to Kosinkadink/ComfyUI-VideoHelperSuite development by creating an account on GitHub.
2.実際に動かしてみる
今回はあらかじめ WAN で webp 動画を生成したものを読み込み、フレーム補完を行っていきます。以下のように繋ぎます。
RIFE VFI ノードの multiplier の数値が、画像の間に追加するフレームの数になります。2なら動画のフレーム数は倍になります。
動画を保存する際には、増えたフレーム数を加味した fps を設定する必要があります。動画のフレーム数が2倍になるなら、fps の数値も2倍にしないとスローモーションのような動画になります。
実際に multiplier を2にして出力した動画が以下となります。左が元動画 fps = 16、右がフレーム数2倍 fps = 32 です。


少し滑らかになったのが分かるでしょうか。
これを multiplier = 4 にすると下のようになります。
このブログの仕様なのか、アップロードすると動きがスローになってしまいました。
fps = 60 を超えているため、動きの滑らかさは格段に良くなっています。ただし残像感が強くなる場合もあるので、パラメータには気を付けたいところです。
0 件のコメント:
コメントを投稿