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