Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > WhiteRabbit > 🐇 Autocrop to Loop

ComfyUI Node: 🐇 Autocrop to Loop

Class Name

AutocropToLoop

Category
video utils
Author
Artificial-Sweetener (Account age: 594days)
Extension
WhiteRabbit
Latest Updated
2026-07-28
Github Stars
0.08K

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

Enhances looping quality by determining optimal end crop point for seamless transitions in video loops.

🐇 Autocrop to Loop:

The AutocropToLoop node is designed to enhance the looping quality of video clips by automatically determining the optimal end crop point. This node is particularly beneficial for AI artists who work with video loops, as it helps in creating seamless transitions between the end and start of a loop. By analyzing the frames of a video clip, the node evaluates various cropping options to find the best loop point, ensuring smooth continuity. This process is crucial for maintaining the aesthetic and functional integrity of looping animations, making it an essential tool for artists aiming to produce high-quality, professional-grade video loops.

🐇 Autocrop to Loop Input Parameters:

clip_frames

This parameter represents the full video clip you wish to process, formatted as NHWC (Number, Height, Width, Channels) with values ranging from 0 to 1. The node will attempt various cropping options from the start to the maximum specified end crop frames to determine the best loop point. This input is crucial as it forms the basis of the autocropping process, directly impacting the quality of the resulting loop.

max_end_crop_frames

This integer parameter specifies the maximum number of frames to consider for cropping at the end of the clip. The default value is 12, with a minimum of 0 and a maximum of 10000. A higher value increases the number of potential cropping candidates, which can slow down the process but may result in a better loop. Adjusting this parameter allows you to balance between processing time and loop quality.

include_first_step

This boolean parameter, defaulting 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. Including this step can help in maintaining consistency and smoothness at the beginning of the loop, which is essential for creating a seamless transition.

include_last_step

Another boolean parameter, also defaulting to true, which decides if the last pair of neighboring frames within the retained region should be used as a target. This inclusion helps ensure that the end of the loop aligns well with the start, contributing to a smooth and continuous loop.

include_global_median_step

This boolean parameter, defaulting to false, allows the use of the median step across the retained region, provided there are at least three frames. This option helps in mitigating the impact of outliers, ensuring that the loop is not disrupted by irregular frame transitions. It is particularly useful in maintaining overall loop consistency.

🐇 Autocrop to Loop Output Parameters:

best_loop

The output parameter best_loop represents the optimized video clip with the best determined loop point. This output is crucial as it provides the final product of the autocropping process, a seamless loop that can be directly used in creative projects. The quality of this output is directly influenced by the input parameters and the node's processing capabilities.

🐇 Autocrop to Loop Usage Tips:

  • Experiment with the max_end_crop_frames parameter to find a balance between processing time and loop quality. Higher values may yield better loops but will take longer to process.
  • Use the include_global_median_step option if your clip has significant frame variations, as it can help in achieving a more consistent loop by ignoring outliers.

🐇 Autocrop to Loop Common Errors and Solutions:

"Invalid clip format"

  • Explanation: This error occurs when the input clip does not conform to the NHWC format or has values outside the 0–1 range.
  • Solution: Ensure your input clip is correctly formatted as NHWC and that all pixel values are normalized between 0 and 1.

"Max end crop frames exceeded"

  • Explanation: This error indicates that the max_end_crop_frames parameter is set beyond the allowable range.
  • Solution: Adjust the max_end_crop_frames parameter to be within the 0 to 10000 range.

"Insufficient frames for median step"

  • Explanation: This error arises when the include_global_median_step option is enabled, but the clip has fewer than three frames.
  • Solution: Ensure your clip has at least three frames or disable the include_global_median_step option.

🐇 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.

🐇 Autocrop to Loop