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 > FunUI > FunUI Cut Opening

ComfyUI Node: FunUI Cut Opening

Class Name

FunUICutOpening

Category
FunUI/Output
Author
digital-garbage (Account age: 1276days)
Extension
FunUI
Latest Updated
2026-11-03
Github Stars
0.02K

How to Install FunUI

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

FunUI Cut Opening Description

Trims opening frames from generated videos and cuts matching audio to keep clips synchronized.

FunUI Cut Opening:

FunUICutOpening removes the beginning of a generated video clip and trims the accompanying sound by the same amount of time. It is especially useful for image-to-video work, where a reference image helps establish the subject’s identity, visual style, and composition but also appears as the opening still. You can generate the shot normally, then remove that opening to begin further into the action without weakening the reference image’s influence during generation. The node works on decoded images—the actual visible frames—rather than the compressed video representation used during generation. This makes the cut correspond directly to a number of visible frames and avoids the decoding problems that cutting compressed video data can cause. It performs a straightforward trim: the remaining frames retain their order, no replacement ending is generated, and the finished clip becomes shorter.

FunUI Cut Opening Input Parameters:

images

Required input of type IMAGE containing the decoded video frames in playback order. The node treats the first dimension of this image batch as the clip’s frame count and removes frames from its beginning, leaving the remaining images unchanged. Connect decoded video frames here rather than latent samples; in the supplied H3 pipeline, this connection comes from FunUIDecode. For a nonempty clip, the node limits the cut so that at least one frame remains, even if you request more frames than can be removed. No default value, numeric range, or selectable options are defined for this input.

frames

Required INT parameter specifying how many frames to remove from the beginning of the clip. Its default is 0, minimum is 0, and maximum is 4096. A value of 0 leaves both the images and any accompanying audio unchanged. Increasing this value moves the start further into the generated action and shortens the clip accordingly; for example, removing 12 frames from a 24 fps clip removes half a second. The actual cut is limited to one less than the available frame count, so a nonempty clip cannot become empty through trimming. If your request exceeds that limit, the node keeps one frame and reports the adjustment in its status message.

fps

Required FLOAT parameter specifying the frame rate used to convert the removed frame count into time. Its default is 24.0, minimum is 1.0, maximum is 240.0, and adjustment step is 0.01. This value determines how much audio is removed and how the cut duration is reported; it does not change the number of image frames removed or resample the video. For example, cutting 24 frames at 24 fps removes one second of audio, whereas cutting the same number at 48 fps removes half a second. Set this to the frame rate you intend to use when saving or playing the clip so that the picture and sound receive matching time cuts.

audio

Optional input of type AUDIO containing the sound associated with the video. When connected and a cut is made, the node removes audio from the beginning using the actual number of removed video frames, the specified frame rate, and the audio’s sample rate. The calculated audio sample count is rounded to the nearest whole sample and limited to the available audio length. The sample rate and other entries in the audio data are preserved. If the requested time cut consumes all available sound, the resulting audio waveform is empty; unlike the image frames, audio is not guaranteed to retain a sample. If this input is omitted, the node still trims the images and returns no audio. No default audio asset, numeric range, or selectable options are defined.

FunUI Cut Opening Output Parameters:

images

IMAGE output containing the frames remaining after the opening is removed, in their original order and without changes to their visual content. For a nonempty input clip, the remaining frame count is the original count minus the actual cut, with at least one frame retained. If no frames are removed, the original image batch is returned unchanged. Connect this output to your video-saving node so the exported clip uses the trimmed sequence rather than the original decoded frames.

audio

AUDIO output containing the accompanying sound after the matching opening duration has been removed. The trim is calculated from the actual video cut, not an excessive requested cut, which keeps both cuts aligned to the same intended duration. The audio sample rate and other audio metadata are preserved, while the waveform starts later in the original recording. If no cut is made, the original audio is returned unchanged; if no audio was connected, this output is None. A cut that reaches or exceeds the available audio duration produces an empty waveform. The node only trims the beginning and does not otherwise adjust the audio’s duration to match the remaining video.

status

STRING output describing the action taken. When no frames are removed, its exact value is nothing cut. Otherwise, it reports the actual removed frame count, original frame count, and removed duration rounded to two decimal places, such as cut 12 of 120 frames (0.50s). If your requested cut would leave no image frames, the message adds an explanation, such as cut 119 of 120 frames (4.96s); asked for 150, but one frame has to stay. Use this output to verify the effective cut, particularly when working with clips shorter than expected.

FunUI Cut Opening Usage Tips:

  • Place the node after video decoding and before video saving. The supplied H3 pipeline follows FunUIDecode → FunUICutOpening → FunUISaveVideo, allowing the cut to operate on visible frames rather than latent data.
  • For image-to-video shots, start with a small cut and preview the result. Increase frames until the opening reference still or unwanted initial moment is removed, while checking that you retain the action you want.
  • Calculate a starting setting by multiplying the desired cut duration in seconds by the clip’s frame rate, then choosing a whole frame count. At 24 fps, 6 frames removes 0.25 seconds, 12 frames removes 0.5 seconds, and 24 frames removes 1 second.
  • Match fps to the frame rate used by your video-saving node. Changing it here does not change video playback speed; it changes the audio trim duration and the reported cut time.
  • Connect both trimmed outputs to your video-saving node when working with sound. Combining trimmed images with the original, untrimmed audio can introduce a timing offset.
  • Use frames set to 0 to keep the node connected while disabling the trim. This passes the images and audio through unchanged and returns nothing cut.
  • Allow for a shorter final shot when planning generation length. This node does not replace removed footage, extend the ending, or regenerate motion.
  • Check status when a clip unexpectedly becomes extremely short. The node preserves one image frame rather than rejecting an oversized cut, so a completed operation does not necessarily mean the requested trim was suitable.

FunUI Cut Opening Common Errors and Solutions:

nothing cut

  • Explanation: This is a normal status message, not an error. It means the effective cut was zero, usually because frames is 0 or the input clip contains only one frame.
  • Solution: Increase frames if you want a trim. If the message persists, check that images contains a multi-frame decoded video rather than a single still image.

cut …; asked for …, but one frame has to stay

  • Explanation: This status message means you requested more frames than can be removed while retaining one image frame. The node reduced the cut automatically, potentially leaving a one-frame result.
  • Solution: Lower frames to leave the amount of footage you need. Check the original frame count shown in the message and confirm that the full decoded clip reaches the node.

Sound and picture are out of sync after trimming

  • Explanation: This is a possible result rather than a custom error message. A mismatched fps value causes the audio to be trimmed by a different duration than the video represents at export. Routing original audio alongside trimmed images can cause the same symptom.
  • Solution: Set fps to match the saved video’s frame rate and connect both images and audio from FunUICutOpening to your video-saving node. Also verify that the source audio and video were synchronized before trimming.

Audio is empty after the cut

  • Explanation: The calculated opening trim can consume the entire audio waveform if the sound is shorter than or equal to the removed duration. The node limits audio removal to the available samples but does not preserve a minimum audio length.
  • Solution: Reduce frames, check fps, or provide audio that extends beyond the cut point. If you intend to export without sound, omit the audio connection rather than depending on a downstream node to handle an empty waveform.

KeyError: 'waveform' or KeyError: 'sample_rate'

  • Explanation: These Python errors can occur during a nonzero cut if the connected audio data is missing the waveform or sample-rate entry that the node expects. They indicate malformed audio data rather than a problem with the requested frame count.
  • Solution: Supply a valid ComfyUI AUDIO connection from an audio-loading or decoding node. If sound is unnecessary, disconnect the optional audio input.

AttributeError involving 'shape', or an indexing error

  • Explanation: The node reads the image batch’s frame count through its shape and slices that batch to trim it. It also reads and slices the audio waveform when sound is present. Incorrectly structured data can therefore cause shape-related or indexing errors; the exact message depends on the supplied data.
  • Solution: Connect decoded IMAGE data to images, not latent samples, a filename, or another data type. For audio-related failures, check that the source provides a standard ComfyUI AUDIO object with a waveform.

ZeroDivisionError: float division by zero

  • Explanation: This can occur during a nonzero cut if fps is forced to 0 outside the declared interface limits. The normal interface prevents this by setting a minimum of 1.0.
  • Solution: Use the clip’s actual positive frame rate within the supported 1.0–240.0 range. If you construct workflows programmatically, validate fps before running the node.

The result is still empty or fails downstream with an empty image batch

  • Explanation: The one-frame safeguard only preserves a frame when the incoming clip already contains at least one. If the incoming image batch is empty, the node cannot create a replacement frame, and the resulting failure may appear later in the workflow.
  • Solution: Check the generation and decoding stages to confirm they produce a nonempty image batch. Preview or inspect the decoded frames before connecting them to FunUICutOpening.

FunUI Cut Opening Related Nodes

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

FunUI Cut Opening