ComfyUI > Nodes > MTB Nodes > Batch2d Transform (mtb)

ComfyUI Node: Batch2d Transform (mtb)

Class Name

Batch2d Transform (mtb)

Category
mtb/batch
Author
melMass (Account age: 3754days)
Extension
MTB Nodes
Latest Updated
2024-07-02
Github Stars
0.35K

How to Install MTB Nodes

Install this extension via the ComfyUI Manager by searching for MTB Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter MTB 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Batch2d Transform (mtb) Description

Apply dynamic 2D transformations to image batches for enhanced visual effects and storytelling.

Batch2d Transform (mtb):

The Batch2d Transform (mtb) node is designed to apply a series of 2D transformations to a batch of images using a set of keyframes. This node is particularly useful for AI artists who want to create dynamic and complex visual effects by manipulating image properties such as position, rotation, zoom, and shear over time. By leveraging this node, you can achieve smooth transitions and animations in your image sequences, enhancing the visual appeal and storytelling of your projects. The node's primary goal is to provide a flexible and powerful tool for batch processing images, allowing you to experiment with various transformation parameters to achieve the desired artistic effects.

Batch2d Transform (mtb) Input Parameters:

image

This parameter expects an image tensor that represents the batch of images you want to transform. The images should be in a format compatible with PyTorch tensors.

border_handling

This parameter determines how the borders of the images are handled during the transformation. The available options are "edge", "constant", "reflect", and "symmetric". The default value is "edge". Choosing the appropriate border handling method can affect the appearance of the transformed images, especially at the edges.

constant_color

This parameter specifies the color used when the border_handling parameter is set to "constant". The default value is "#000000" (black). This color will fill any areas that extend beyond the original image boundaries during the transformation.

x

This optional parameter is a list of float values representing the x-axis translations for each frame in the batch. These values determine how much each image is shifted horizontally.

y

This optional parameter is a list of float values representing the y-axis translations for each frame in the batch. These values determine how much each image is shifted vertically.

zoom

This optional parameter is a list of float values representing the zoom levels for each frame in the batch. These values determine the scaling factor applied to each image, allowing you to zoom in or out.

angle

This optional parameter is a list of float values representing the rotation angles for each frame in the batch. These values determine the degree of rotation applied to each image.

shear

This optional parameter is a list of float values representing the shear factors for each frame in the batch. These values determine the amount of skew applied to each image.

Batch2d Transform (mtb) Output Parameters:

IMAGE

The output parameter is an image tensor that represents the batch of transformed images. This tensor contains the images after applying the specified 2D transformations, such as translation, rotation, zoom, and shear, based on the input parameters.

Batch2d Transform (mtb) Usage Tips:

  • Experiment with different combinations of x, y, zoom, angle, and shear parameters to create unique and dynamic visual effects in your image sequences.
  • Use the border_handling parameter to control how the edges of your images are treated during transformations, especially if you notice unwanted artifacts at the borders.
  • When using the constant border handling option, choose a constant_color that complements your images to maintain visual consistency.

Batch2d Transform (mtb) Common Errors and Solutions:

"Invalid image tensor format"

  • Explanation: The input image tensor is not in a compatible format.
  • Solution: Ensure that the input image tensor is a valid PyTorch tensor and follows the expected dimensions and data type.

"Mismatched parameter list lengths"

  • Explanation: The lengths of the optional parameter lists (x, y, zoom, angle, shear) do not match the number of frames in the batch.
  • Solution: Verify that all optional parameter lists have the same number of elements, corresponding to the number of frames in the batch.

"Unsupported border handling option"

  • Explanation: The value provided for the border_handling parameter is not one of the supported options.
  • Solution: Use one of the supported options: "edge", "constant", "reflect", or "symmetric".

"Invalid constant color format"

  • Explanation: The constant_color parameter is not in a valid color format.
  • Solution: Ensure that the constant_color is specified in a valid hex color format, such as "#RRGGBB".

Batch2d Transform (mtb) Related Nodes

Go back to the extension to check out more related nodes.
MTB Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.