FIRST
FIRST copied to clipboard
Frame Interpolation Refined with Stable Diffusion via Control Net
FIRST - Frame Interpolation Refined with Stable diffusion via control neT
Problem Statement
Traditional frame interpolation techniques were mainly trained on the motions and colors of pixels. As such, they work better for frames with relatively little difference in between. When the difference is too significant, the estimations become unreliable, and the algorithms essentially start guessing, resulting in ghosting artifacts that people usually associate with frame interpolation.
Proposed Solution
Stable Diffusion, on the other hand, is a generative model capable of creating more coherent pixels instead of artifacts.
By combining the newly introduced reference_only module from ControlNet, which influences the generated result with provided references as the name implies,
and the img2img feature from Stable Diffusion, you can refine the interpolated frame and generate a more cohesive result.
Sample Images
The following base interpolated frames were generated using Flowframes with the RIFE model
| Previous Frame | RIFE | F.I.R.S.T | Next Frame |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Sample Videos
RIFE

F.I.R.S.T

Above contents were used solely for research purposes
Code
A simple Python GUI that streamlines this process
Prerequisite
- Automatic1111 Webui
- sd-webui-controlnet Extension
- (Highly Recommended) FFmpeg
How to Use
-
In the settings of Automatic1111, set
Multi ControlNet: Max models amountto2or above- Recommended to set
Model cache sizeto2as well
- Recommended to set
-
Launch Automatic1111 with
apienabled- Open the
webui-user.batand add--apiafterCOMMANDLINE_ARGS= - Set your checkpoint accordingly (Realistic / Anime)
- Open the
-
(Optionally) Edit
parameters.pyto change the Stable Diffusion settings, such asstepsorsampler -
Launch
main.pyto open the GUI- On Windows, you can just use
launch.bat
- On Windows, you can just use
-
Enter the path containing the frames
- The path should contain both the original and the interpolated frames in sequence (Default behavior of
Flowframeswhen you set the export toImage Sequence) - Only supports 2x interpolations, meaning the odd files should be original frames while even files should be interpolated frames
- The path should contain both the original and the interpolated frames in sequence (Default behavior of
-
Enter the path to store the outputs
- Recommended to set a different path from Source
-
Enter the port
- The default is
7860
- The default is
-
Press Run
-
Check the console for progress
-
Use
FFmpegto merge the frames into video






