---
title: 'Interpolate infinite number of frames with small VRAM usage in ComfyUI AI, RIFE, FILM'
source: 'https://youtube.com/watch?v=1uimyIvuSvY'
video_id: '1uimyIvuSvY'
date: 2026-06-15
duration_sec: 0
---

# Interpolate infinite number of frames with small VRAM usage in ComfyUI AI, RIFE, FILM

> Source: [Interpolate infinite number of frames with small VRAM usage in ComfyUI AI, RIFE, FILM](https://youtube.com/watch?v=1uimyIvuSvY)

## Summary

This tutorial demonstrates a ComfyUI workflow for interpolating large numbers of image frames without running out of memory. The workflow processes frame pairs sequentially, using custom nodes to automate indexing and avoid duplicate frames. It is designed for users with limited VRAM who need to create smooth animations from many frames.

### Key Points

- **Problem and Solution Overview** [0:00] — The video addresses how to interpolate large batches of frames without memory issues by processing one pair at a time.
- **Loading Images** [1:43] — Use 'Load Image Batch' node from VHS suite, set path, and use single image mode. Duplicate node to load two consecutive frames.
- **Batching and Interpolation** [2:34] — Pack two frames into a batch using 'Batch Images' node, then feed into 'RIFE Interpolation' node. Set number of frames to generate between.
- **Automating Index Increment** [5:08] — Use 'Incremental' node from MuseV suite to increase index each run. Add 1 to index for second load node using 'Number Operation' node.
- **Handling Duplicate Frames** [10:54] — RIFE outputs start and end frames plus interpolated frames, causing duplicates. Use 'Split Image Batch' to separate first frame and conditional logic to skip it after first run.
- **Conditional Logic with Compare Node** [14:21] — Use 'Compare' node from ComfyUI Logic pack to check if index > 0. If true, output split batch (without first frame); if false, output full batch.
- **Running the Workflow** [18:44] — Enable 'Auto Queue' to process all frame pairs sequentially. Workflow stops when no more frames to process.

### Conclusion

This workflow allows interpolating any number of frames sequentially, saving VRAM by processing one pair at a time. It eliminates duplicate frames using conditional logic and is available on GitHub.

## Transcript

hello to this new tutorial today I want
to show you how you can interpolate big
piles of frames without running into
memory issues I got question in the
comments how to do this and I researched
it a little bit and I realized that
there is nothing like this workflow so
far so I created something which is
based on already generated images in a
folder and this workflow runs through
this folder step by step and generates
the interpolated frames between every
frame pair step by step without loading
the whole folder so that your rum is not
filled with all the frames and will not
overrun so only one interpolation is
done at once and this workflow goes
through your folder of images Step by
step this is based on a wild mix of
custom comy UI notes which I will list
in the description below it was quite a
wild ride to find the notes which work
well together but in the end everything
worked out so in the future I might make
a new version an updated version of this
workflow with more simple notes or maybe
a little bit easier to work with but for
now this is working it should help a lot
of you to work through big piles of
images and interpolate the whole bunch
of them through without having memory
issues let's start from scratch I want
to start with loading our images I use
the load image badge note from the V
note
suit so add note or suit
IO load image badge
I Define the path of all the frames I
want to interpolate
between and we use the single image mode
here we need to duplicate this since we
need two frames to interpolate between
and we need to pack our
frames to a batch
so we pipe both outputs into our batch
images node
to have a batch which we then can fill
into our interpolation
node I I use the
RVE interpolation note
I keep the settings uh like this for
now and then I want to save the
results for this I choose the V notepad
again and choose the image save note of
the V pack this note gives us a
possibility to define a folder where we
put our interpolated frames into we need
to Define which frame the load image
batch node will load in this case uh the
first note is uh has the index zero so
that means it's loading the
first
frame and this uh note needs the index
of one this means it's loading the
second
frame in
programming um you point up from zero
zero means one so in programming and
informatics uh you're starting at zero
just just at a side
note and this should give us results
already I will have a test so as a base
I take some simple animate diff uh
animation I did before and we see out of
those two frames there have been created
three frames if we push this up to 10 we
get 11 frames so this is only the first
step this is the basic interpolation
this only uses the first and the second
frame for now to go through our whole
pile of images we need to do some
Automation and special things now let's
first start by making an
automation to crank up our index we need
to count
up this value and this value one by one
so that we later can run through
everything sing frame frame for this I
use the incremental note out of the
musarat
noes this gives us the possibility every
time we run the patch the number in this
node will be increased and then we can
fill in this number to our load image
batch nodes we have to set this to
increment and now since we need
this note have the number one higher
than in this note so this the zero this
one when this is one I need this to be
two so we have
to add one to the output of this note to
fill the value into this note we could
take two of those
notes uh with the difference of
one to fill uh in the second
note but I find it easier like this way
so you only have to adjust one number in
the start of the workflow so this is
easier for the addition of one to this
number I use the number operation Noe
out of the V not
suit since this is taking numbers I have
to convert this
integer to a
number since this is not an input we
have to converted to an
input so right click on this arrow and
choose convert a to input now we can
fill in our integer
and it will be converted to a
number so we're filling this number a
into this number operation and we choose
addition as an action and now we need
another number which is added to number
a
so we use the into number again
put it to one and fill it inside our
number
operation and now we need
to convert the index settings of our
notes to inputs also right click on this
arrow and convert index to input and do
this for the first note for the first
batch note
also convert index to input and now we
can fill the integer value into our
index and we can fill this integer to
the first one so this seat is zero so in
the first PA of this workflow we have a
zero filled into the load image batch
node and it will load the first image
image out of the
folder for the second batch it it will
add
one this one to our zero so we get one
as an output and this gets number one as
an index and will load the second
image so sorry if this is a little bit
complicated uh with the zero and the one
and the shift of one number but uh it is
like it is in mathematics and in
informatics in programming like this and
I cannot change it but you will get
familiar with it if you're not used to
it this control after generate will
increment our number one step after each
generation and this will step through
our whole folder first time we use it
there will be index zero index one the
next time this will one so we will have
index one and index two this means the
second frame out of the folder and the
third frame will be loaded and
interpolated between then this will be
two that means the search frame will be
interpolated to the force frame and so
on so to automate this we need to use
the extra options in the Q prompt and we
need to check the auto que option so
after the after every gener Generation
The Prompt will be started again and the
number will be increased into one and it
will go through all your images step by
step and not all at once so they will
not be loaded everything into your rum
and this is much more RAM saving as if
you have to load everything to your room
but we're not finished yet we have one
problem this RVE Noe will output uh our
first frame and our second frame and all
the frames in between every time we run
this workflow that means that there will
be some frames doubled so when we
generate between first and second and
then between second and third the second
frame will be doubled and then when we
generate between third and fourth uh the
third frame will be doubled and the
fourth frame and the fifth frame and the
sixth frame and so forth this is because
the ri interpolation node
always all frames out so the first the
second and the frames in between and we
have a doubling of those end and first
frames every run now it gets a little
bit complicated we need some if and else
Logic for this we need to split our
image batch and separate the first frame
and only output the last frames with all
the starting frames because of the
duplication we need to make some space
here and run our batch of 11 images into
Split Image batch node it's part of the
VHS notes this can split our batch which
is consisting of 11 image in this case
and can output uh two batches and split
it at a certain point so in this case I
split it after index one this gives us
the first image of the batch to image a
and the 10 images after the go to image
B so let's have a image preview here and
an image preview here to see what we get
out of this note so let's
generate so what you see here is we get
our first frame here separated and then
the frames after that get outputed here
so this is 10 frames this is one and
this gives us all the 11 frames here
since the first generation generat the
images with the end frame we don't need
this end frame which is the same as the
starting frame for the Next Generation
we don't need the starting frame we can
split it off we only need those frames
since this would be double we have to
check if this worklow is running the
first time if so we put out every 11
frames if it is not we only put out
those 10 frames without the starting
frame to prevent the doubling we do this
with the image input switch note from
the v no
suit this um image input switch is quite
simple
depending of the Boolean input true or
false it's sending image a through to
the output or image B so we pipe our
splitted images into the image a port
and the unsplit images to the image B
port and now we need the Boolean
information true or false for this we
need
to make a logic uh operation and compare
our values so we use the comp Paran note
out of the comi logic
pack the bo part goes to the Boolean
input of this
note you already can connect the images
to the image safe
node and now we need some information
here so at first I connect
our n
index into the compare node to the a
input
and for the
bport I take another incremental
Noe so connect this to the bport and set
it to zero and set it to
fixed so we are comparing our initial
index which goes to a with the number we
put to be so the number is zero and we
look if a is bigger than b so if our
index is zero we
know it is not bigger than zero it is
equal so this is false so it gives false
to the image input
switch and this means our image B will
go through our
output if we process our workflow
another time the index will be
one and therefore it is bigger than our
zero so that means the compare node will
output
two and this gives the input switch the
information to to bypass the image a
output to the safe note that means the
reduced the splitted batch without the
starting image so that we don't have
duplicate
images and this will be done until our
batch is done so what is really
important for the incremental note at
the beginning is that this max value is
bigger than the amount of images you
want to process so if you have let's say
200 images this should be bigger than
200
so just put in a super big number and
you will be fine let's have another
look so let's put the multiplier a
little bit
smaller and let's put our seat again
back to
zero and
we should be good to go let's give it a
try let's disable the auto que again for
a test this should output our first
image the interpolated image in between
and the last image now if we run it for
the first time
so that should the output should be
three
images so there we are we have our three
images every other
generation should output two images only
depending on this
logic and so that we have no duplicate
images so let's do it another one it
should only output two
images there we go two images another
one should only output two images
again and there we go it's going through
our batch
step by step and calculating the images
between every pair of images so we can
hit the auto que feature again and let
it run
through so we're ending with this error
message there is no object left to
process this workflow can used for as
many images as you like so yeah let's
have a look at the results really smooth
because of the
interpolation and I cannot see any
double images since this uh workflow is
quite complicated I decided to put it on
my GitHub page so that you can download
it uh maybe a quick walk through how you
would use it it's important to set your
folder path
here on both
uh load image batch
notes should both be the same path then
you need to adjust the seat settings to
zero and
then set your output pass and then you
should be good to go I put a link to the
file on my GitHub in the description
below as well as links to all the custom
notes you need I hope this walk through
this tutorial helps you and please
subscribe and like the video I hope to
see you soon goodbye
