ComfyUI > Nodes > Comfyui-PT-Keyframe-Camera > Keyframe Camera (Pan & Zoom)

ComfyUI Node: Keyframe Camera (Pan & Zoom)

Class Name

PT_KeyframeCamera

Category
KJNodes/animation
Author
ptmaster (Account age: 4419days)
Extension
Comfyui-PT-Keyframe-Camera
Latest Updated
2025-07-06
Github Stars
0.02K

How to Install Comfyui-PT-Keyframe-Camera

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

Keyframe Camera (Pan & Zoom) Description

Facilitates keyframe-based camera movements for image sequences, enhancing visual projects with dynamic motion.

Keyframe Camera (Pan & Zoom):

The PT_KeyframeCamera node is designed to facilitate keyframe-based camera movements, such as panning, zooming, and rotating, for image sequences. This node is particularly beneficial for AI artists looking to add dynamic motion to their visual projects, allowing for smooth transitions and transformations between frames. By defining start and end parameters for various camera movements, users can create complex animations that enhance the storytelling and visual appeal of their work. The node's primary function is to interpolate these movements over a specified number of frames, providing a seamless animation experience without requiring extensive technical knowledge.

Keyframe Camera (Pan & Zoom) Input Parameters:

images

This parameter accepts a sequence of images that will undergo the specified camera movements. It is crucial as it forms the base content on which the transformations will be applied.

start_frame

Defines the initial frame number from which the camera movement will begin. The default value is 0, with a minimum of 0 and a maximum of 9,999,999. This parameter helps in setting the starting point of the animation.

end_frame

Specifies the final frame number where the camera movement will conclude. The default is 24, with the same range as the start_frame. It determines the duration of the animation.

start_horizontal_shift

Indicates the horizontal shift at the start frame, with a default of 0. The range is from -MAX_RESOLUTION to MAX_RESOLUTION, where positive values shift the image to the right and negative values to the left. This parameter controls the initial horizontal position of the camera.

start_vertical_shift

Sets the vertical shift at the start frame, with a default of 0. The range is similar to the horizontal shift, where positive values move the image down and negative values move it up. It adjusts the initial vertical position of the camera.

start_rotation

Defines the rotation angle at the start frame in degrees, with a default of 0. The range is from -360 to 360 degrees. This parameter allows for initial rotational adjustments to the image.

start_zoom

Specifies the zoom level at the start frame, with a default of 1.0. The range is from 0.01 to 10.0, allowing for zooming in or out. It sets the initial scale of the image.

end_horizontal_shift

Indicates the horizontal shift at the end frame, with a default of 100. The range is the same as the start_horizontal_shift. This parameter controls the final horizontal position of the camera.

end_vertical_shift

Sets the vertical shift at the end frame, with a default of 0. The range is similar to the start_vertical_shift. It adjusts the final vertical position of the camera.

end_rotation

Defines the rotation angle at the end frame in degrees, with a default of 0. The range is from -360 to 360 degrees. This parameter allows for final rotational adjustments to the image.

end_zoom

Specifies the zoom level at the end frame, with a default of 1.0. The range is from 0.01 to 10.0, allowing for zooming in or out. It sets the final scale of the image.

zoom_origin

Determines the point of origin for the zoom effect, with options including "center", "top-left", "top-right", "bottom-left", and "bottom-right". The default is "center". This parameter affects how the zoom is applied relative to the image.

pad_mode

Specifies the padding mode to use when the image is shifted or rotated, with options "color" and "edge". The default is "color". This parameter determines how the empty spaces are filled during transformations.

bg_color

Defines the background color used when the pad_mode is set to "color". The default is "0, 0, 0", representing RGB values. This parameter is important for maintaining visual consistency when parts of the image are moved out of frame.

Keyframe Camera (Pan & Zoom) Output Parameters:

images

The output images are the transformed sequence, reflecting the applied camera movements. This output is crucial for visualizing the animation and ensuring the desired effects are achieved.

masks

The masks output provides additional data that can be used for further processing or compositing, helping to isolate or highlight specific areas of the transformed images.

Keyframe Camera (Pan & Zoom) Usage Tips:

  • To create a smooth animation, ensure that the start and end parameters are set to values that provide a natural transition between frames.
  • Experiment with different zoom origins to achieve unique visual effects, especially when combining zoom with rotation.

Keyframe Camera (Pan & Zoom) Common Errors and Solutions:

Invalid frame range

  • Explanation: The start_frame is greater than the end_frame.
  • Solution: Ensure that the start_frame is less than or equal to the end_frame to define a valid animation range.

Out of bounds shift values

  • Explanation: The horizontal or vertical shift values exceed the allowed resolution limits.
  • Solution: Adjust the shift values to be within the -MAX_RESOLUTION to MAX_RESOLUTION range.

Invalid zoom level

  • Explanation: The zoom level is set outside the allowed range.
  • Solution: Ensure the zoom level is between 0.01 and 10.0 to avoid distortion or errors in rendering.

Keyframe Camera (Pan & Zoom) Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-PT-Keyframe-Camera
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.