ComfyUI > Nodes > WhiteRabbit > 🐇 Autocrop to Loop

ComfyUI Node: 🐇 Autocrop to Loop

Class Name

AutocropToLoop

Category
video utils
Author
Artificial-Sweetener (Account age: 367days)
Extension
WhiteRabbit
Latest Updated
2025-11-17
Github Stars
0.04K

How to Install WhiteRabbit

Install this extension via the ComfyUI Manager by searching for WhiteRabbit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WhiteRabbit in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🐇 Autocrop to Loop Description

Automatically crop video frames for seamless loops with evaluation based on multiple criteria for natural transitions.

🐇 Autocrop to Loop:

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.

🐇 Autocrop to Loop Input Parameters:

p_frames

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.

max_end_crop_frames

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.

include_first_step

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.

include_last_step

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.

🐇 Autocrop to Loop Output Parameters:

images

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.

🐇 Autocrop to Loop Usage Tips:

  • To achieve the best results, experiment with different values for max_end_crop_frames to find the optimal balance between processing time and loop quality.
  • Ensure that both 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.

🐇 Autocrop to Loop Common Errors and Solutions:

"Input clip is empty"

  • Explanation: This error occurs when the input video clip (p_frames) is empty or not properly loaded.
  • Solution: Verify that the input clip is correctly loaded and contains frames. Check the file path and format to ensure compatibility.

"Invalid max_end_crop_frames value"

  • Explanation: This error arises when the max_end_crop_frames parameter is set to a value outside the allowed range.
  • Solution: Adjust the max_end_crop_frames value to be within the specified range of 0 to 10,000.

"Inconsistent frame dimensions"

  • Explanation: This error indicates that the frames in the input clip have inconsistent dimensions, which can affect the cropping process.
  • Solution: Ensure that all frames in the input clip have the same dimensions before processing with the AutocropToLoop node.

🐇 Autocrop to Loop Related Nodes

Go back to the extension to check out more related nodes.
WhiteRabbit
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.