Smoother motion: more frames between frames
Lesson "video-interpolate", in the group Video of the lesson list. Steps: 7.
What you will be able to do
A finished clip gets twice as many frames and plays smoothly at twice the frame rate.
What you need
- It goes on from Video on a modest graphics card: Wan 2.2 5B. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- for
model_nameof Load Frame Interpolation Model: a file whose name hasfilm.
- for
- Nodes: Load Video, Get Video Components, Load Frame Interpolation Model, Frame Interpolate, Create Video, Save Video.
- The app downloads and installs nothing. The step texts below say which files and folders, and which ComfyUI template names them.
The steps
The words of each step, as the lesson shows them. Node names are in bold.
What interpolation does (reading)
An interpolation model looks at two neighbouring frames and draws the one between them. A 16 fps clip becomes a smooth 32 fps one, and its length in seconds stays the same.
What it costs: a small model (FILM or RIFE, tens of megabytes) in
models/frame_interpolation. It runs on any card that runs ComfyUI, and quickly: seconds to minutes. The memory grows with the size and the number of frames.These are ComfyUI's own nodes. The ComfyUI-Frame-Interpolation pack does the same with its RIFE VFI and FILM VFI nodes. If the canvas already holds another graph, start from an empty one: "File ▸ New project".
Load the clip
Add Load Video and Get Video Components. Choose the clip in
fileand connect the output of Load Video to thevideoinput of Get Video Components. Its outputs are the frames, the sound and the frame rate.Load the interpolation model
Add an Load Frame Interpolation Model node and choose the model in
model_name:film_netis the template's choice, RIFE files are faster.If the file you need is not in the list, your ComfyUI does not have it. The app downloads nothing. The easiest way is to open, in ComfyUI itself, the "Frame Interpolation: FILM or RIFE" template: it shows which files are missing and where to put them. Then choose "Sync ▸ Sync now" in this app's menu, and the files appear in the lists.
Draw the frames between
Add a Frame Interpolate node. Connect the model to its
interp_modelinput and theimagesoutput of Get Video Components to itsimagesinput. Setmultiplierto 2.2 puts one new frame between each two; 4 puts three. A larger number on fast motion invents more and makes more mistakes.
Save at the new frame rate
Add Create Video and Save Video. The frames of Frame Interpolate go into
images, theaudiooutput of Get Video Components intoaudio, and the clip intovideoof Save Video.Set
fpsto the old rate timesmultiplier: for a 16 fps clip and 2, set 32. With the old rate the clip would play twice as slow.When the result is not right (reading)
- Smeared shapes on fast motion: lower
multiplierto 2 or try another model. - The clip is too slow or too fast:
fpsis not the old rate times the multiplier. - Interpolation also gives smooth slow motion: keep
fpsas it was, and the clip plays slower and longer.
- Smeared shapes on fast motion: lower
The graph is ready (reading)
Save the graph with "File ▸ Save workflow for ComfyUI…", open the file in ComfyUI and run it there. This app runs nothing in ComfyUI itself.
What the lesson checks
A reading step is done when you press Got it, next. A doing step ticks itself off when the canvas holds:
- Step 2, Load the clip:
- a Load Video node.
- a Get Video Components node.
VIDEOof Load Video intovideoof Get Video Components.fileof Load Video: a value is chosen.
- Step 3, Load the interpolation model:
- a Load Frame Interpolation Model node.
model_nameof Load Frame Interpolation Model holds a file whose name hasfilm(capitals, dots and dashes do not matter).
- Step 4, Draw the frames between:
- a Frame Interpolate node.
INTERP_MODELof Load Frame Interpolation Model intointerp_modelof Frame Interpolate.imagesof Get Video Components intoimagesof Frame Interpolate (a Upscale Image or Upscale Image By or ImageFromBatch or ImageResizeKJv2 or Resize Image or GetImageRangeFromBatch or ResizeImageMaskNode in between is accepted).multiplierof Frame Interpolate is from 2 to 4; Do this for me sets 2.
- Step 5, Save at the new frame rate:
- a Create Video node.
- a Save Video node.
IMAGEof Frame Interpolate intoimagesof Create Video.audioof Get Video Components intoaudioof Create Video.VIDEOof Create Video intovideoof Save Video.fpsof Create Video is from 2 to 120; Do this for me sets 32.