AnimateDiff 긴 영상 길이 제한없이 변환해보기! (comfyui 그대로 따라하기)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello This is Neural Ninja. In this video, I will teach you how to create a long video with AnimateDiff. The longer the video, the more difficult it is to create due to lack of memory. Learn how to cut a long video into small pieces and create them sequentially. I will teach you how to smoothly combine the created videos into one. For those using Colab, we recommend turning on high-capacity RAM. I prepared a test video. It's a 15 second video. First, let’s load the previous workflow. I will delete the nodes related to the detailer. Let's proceed with a node that loads images instead of video files. I'll write about how to change video files into images in More. If you find it difficult to change, I will explain later how to proceed with the video node as before. I will write down the path where the images are located. Local users can write the path in Explorer. Let's add a constraint image node to use instead of image resizing. I found it convenient to be able to specify the maximum size regardless of the horizontal and vertical ratio. I will set it to 1280 size. Let me reconnect the node. There are currently about 450 converted images. I will create this by dividing it into 100 pieces. You can create it a total of five times. To create 100 sheets at a time, write 100 in the frame load cap. For the order of Skip First Frames, write 100. Just write 0, 100, 200, 300, 400 in that order. For the frame load cap, I will enter 105 from 100 sheets plus 5 sheets. I'll leave 5 extra pieces to connect them smoothly. It's not much different when going to the video node. To determine the total number of images, mute the next node so that it does not proceed like this. Please set the image load cap to 0, set the desired fps, and run it. Please write down the total number of frames output. Afterwards, you can proceed in the same way using image load cap and skip. And in the case of Vid2Vid like now, in the AnimateDiff context option It is better to set it to the newly added standard static. Now let’s create our first clip. Based on Colab T4, it took about 30 minutes for 105 sheets. It was created well, and it lasts about 3.3 seconds based on 30 frames. The video is a bit slow because I entered the fps incorrectly. It doesn't really matter because I'm going to convert the videos into images and put them back together. Now let's create the second clip. I'll enter 100 in Skip and create it. I'm creating them one by one, but in reality, it doesn't matter if you hang them in advance like this. I'll hang up the third clip in advance. The second clip was created and the third clip is in progress. Up to the third clip was created. Based on 1280 size, 100 photos seem to take 30 minutes each. You can create the remaining fourth and fifth numbers by increasing them by 100 like this. First, let's merge the three videos together. Afterwards, more videos will be created, whether 3 or 10. Please collect the created videos in one folder. Please copy the Python script in More I will write down how to install Python and FFmpeg in the more section. Now let's run this Python script. Please enter cmd in the explorer window. Please run Extract Python first. This command changes all videos in a folder into images. If you check, 105 images were created in the folder like this. Now run the Combine Python script. This is a script that combines images and converts them into videos. I'll check it out It came together well. Images combined in the Combine folder were also created like this. Let's add sound I copied the original video to Sound.mp4. When I open the Combine file, the images currently in the folder are also created. 100 shots are set to 30fps. You can change this to fit the criteria you created. You can also change the sound file name like this: Lastly, Video Python is a script that only re-executes video creation. So far, we have learned how to convert long videos with AnimateDiff. Here, I set it to 100 photos in HD size. You will be able to create it more efficiently if you make it in a length and size that suits your environment. I hope the video helps I'll come back with a good video next time thank you
Info
Channel: 뉴럴닌자 - AI공부
Views: 4,516
Rating: undefined out of 5
Keywords:
Id: 6e0ZQR6DODE
Channel Id: undefined
Length: 7min 45sec (465 seconds)
Published: Tue Feb 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.