Visit ComfyUI Online for ready-to-use ComfyUI environment
Automatically crop video frames for seamless loops with evaluation based on multiple criteria for natural transitions.
The AutocropToLoop node is designed to enhance the seamlessness of video loops by automatically cropping frames from the end of a video clip. This process involves evaluating various potential crop points and scoring them based on several criteria to ensure that the transition from the last frame to the first feels natural and continuous. By focusing on factors such as step-size match, similarity match, exposure continuity, and motion consistency, the node aims to create a visually appealing loop that maintains the integrity of the original footage. This node is particularly beneficial for artists and creators looking to produce smooth, professional-quality video loops without the need for extensive manual editing.
This parameter represents the full video clip in the format of NHWC (Number of frames, Height, Width, Channels), with values ranging from 0 to 1. It serves as the input clip from which the node will attempt to create the best possible loop by testing various crop points at the end of the clip. The quality of the loop is determined by evaluating each potential crop point against the scoring criteria.
This integer parameter specifies the maximum number of frames that can be cropped from the end of the video clip. The default value is 12, with a minimum of 0 and a maximum of 10,000. A higher value allows for more potential crop points to be tested, which can lead to a better loop but may also increase processing time.
This boolean parameter, which defaults to True, determines whether the first pair of neighboring frames (frame 0 to frame 1) should be used as a target for step size and similarity when evaluating potential crop points. Including this step can help ensure that the loop starts with a smooth transition.
This boolean parameter, also defaulting to True, indicates whether the last pair of neighboring frames within the kept region should be used as a target for step size and similarity. This helps maintain consistency in the loop by ensuring that the transition from the last frame to the first is as smooth as possible.
The output of the AutocropToLoop node is a cropped version of the input video clip that forms a seamless loop. This output is an image sequence that has been adjusted to ensure that the transition from the last frame to the first is smooth and natural, based on the scoring criteria applied during the cropping process.
max_end_crop_frames to find the optimal balance between processing time and loop quality.include_first_step and include_last_step are set to True if you want to prioritize smooth transitions at both the start and end of the loop.p_frames) is empty or not properly loaded.max_end_crop_frames parameter is set to a value outside the allowed range.max_end_crop_frames value to be within the specified range of 0 to 10,000.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.