ComfyUI > Nodes > CRT-Nodes > Frame Count (Audio or Manual) (CRT)

ComfyUI Node: Frame Count (Audio or Manual) (CRT)

Class Name

AudioOrManualFrameCount

Category
CRT/Audio
Author
CRT (Account age: 1707days)
Extension
CRT-Nodes
Latest Updated
2026-03-16
Github Stars
0.1K

How to Install CRT-Nodes

Install this extension via the ComfyUI Manager by searching for CRT-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter CRT-Nodes 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

Frame Count (Audio or Manual) (CRT) Description

Calculates video frames from audio or manual input, ensuring precise audio-visual sync in ComfyUI.

Frame Count (Audio or Manual) (CRT):

The AudioOrManualFrameCount node is a versatile tool designed for AI artists working with audio and video synchronization in ComfyUI. Its primary function is to calculate the number of frames required for a video based on audio input or a manually specified frame count. This node is particularly beneficial for projects where precise synchronization between audio and visual elements is crucial. By offering the flexibility to either derive the frame count from audio data or use a predefined manual count, it caters to a wide range of creative needs. Additionally, the node includes an option to quantize the frame count to align with WAN video models, ensuring compatibility with specific video processing requirements. This feature is especially useful for artists working with models that require a specific frame count format, such as those following the 4n + 1 rule. Overall, the AudioOrManualFrameCount node streamlines the process of aligning audio and video, enhancing the efficiency and accuracy of multimedia projects.

Frame Count (Audio or Manual) (CRT) Input Parameters:

audio

The audio parameter expects an audio input in the form of a dictionary containing a waveform and a sample rate. This input is crucial when the node is set to calculate the frame count based on audio data. The waveform should be a torch.Tensor, and the sample rate should be an integer. If the audio data is invalid or improperly formatted, the node will default to returning zero frames.

fps

The fps parameter stands for frames per second and determines the frame rate of the video. It is an integer value with a default of 24, and it can range from 1 to 240. This parameter is essential for calculating the duration of the video in frames when using audio data to determine the frame count.

bypass

The bypass parameter is a boolean that, when set to True, instructs the node to ignore the audio input and use the manual_frame_count instead. This is useful when you want to specify the frame count directly without relying on audio data. The default value is False.

manual_frame_count

The manual_frame_count parameter allows you to specify the number of frames manually. It is an integer with a default value of 120, and it can range from 1 to 99999. This parameter is used when the bypass option is enabled, providing a straightforward way to set the frame count without audio input.

quantize_for_wan

The quantize_for_wan parameter is a boolean that, when enabled, adjusts the frame count to fit the 4n + 1 format required by some WAN video models. This ensures compatibility with specific video processing requirements. The default value is False.

Frame Count (Audio or Manual) (CRT) Output Parameters:

frame_count

The frame_count output is an integer representing the total number of frames calculated by the node. This value is derived either from the audio data or the manual frame count, depending on the input parameters. If quantization is enabled, the frame count will be adjusted to meet the 4n + 1 format, ensuring compatibility with certain video models.

Frame Count (Audio or Manual) (CRT) Usage Tips:

  • To ensure accurate frame count calculation from audio, make sure the audio input is correctly formatted with a valid waveform and sample rate.
  • Use the bypass option when you need to specify a precise frame count manually, bypassing the audio calculation entirely.

Frame Count (Audio or Manual) (CRT) Common Errors and Solutions:

Warning (Frame Count Node): Invalid audio data format. Returning 0 frames.

  • Explanation: This error occurs when the audio input is not in the expected dictionary format or lacks the necessary keys (waveform and sample_rate).
  • Solution: Ensure that the audio input is a dictionary containing both a valid waveform and sample rate.

Warning (Frame Count Node): Invalid audio data types. Returning 0 frames.

  • Explanation: This error indicates that the waveform is not a torch.Tensor or the sample rate is not an integer.
  • Solution: Verify that the waveform is a torch.Tensor and the sample rate is an integer.

Warning (Frame Count Node): Empty audio data or zero sample rate. Returning 0 frames.

  • Explanation: This error is triggered when the waveform has no elements or the sample rate is zero.
  • Solution: Check that the waveform contains data and the sample rate is greater than zero.

Frame Count (Audio or Manual) (CRT) Related Nodes

Go back to the extension to check out more related nodes.
CRT-Nodes
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.

Frame Count (Audio or Manual) (CRT)