ComfyUI > Nodes > ComfyUI-Image-Effects > 🔺 Triangulate

ComfyUI Node: 🔺 Triangulate

Class Name

TriangulateNode

Category
Image Effects
Author
orion4d (Account age: 929days)
Extension
ComfyUI-Image-Effects
Latest Updated
2025-05-28
Github Stars
0.02K

How to Install ComfyUI-Image-Effects

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

🔺 Triangulate Description

Transform images into stylized geometric triangles using Delaunay triangulation for artistic effects and abstract simplification.

🔺 Triangulate:

The TriangulateNode is designed to transform an image into a stylized version using a process called triangulation. This node leverages the Delaunay triangulation method to break down an image into a series of triangles, creating a geometric and artistic effect. The primary benefit of using this node is its ability to convert complex images into simpler, abstract forms while maintaining the essence of the original image. This can be particularly useful for creating unique visual effects in digital art, enhancing the aesthetic appeal of images, or preparing images for further processing in creative projects. The node offers flexibility in terms of point distribution and color modes, allowing you to customize the output to suit your artistic vision.

🔺 Triangulate Input Parameters:

image

The image parameter is the input image that you want to transform using the triangulation process. It should be provided as a tensor, and the node will handle the conversion to a suitable format for processing. The quality and resolution of the input image can significantly impact the final output, so using a high-quality image is recommended for the best results.

num_points

The num_points parameter determines the number of points used for triangulation. These points serve as the vertices of the triangles in the output image. A higher number of points will result in a more detailed and complex triangulation, while a lower number will produce a simpler, more abstract effect. The choice of this parameter should balance between detail and abstraction based on your artistic goals.

edge_threshold

The edge_threshold parameter is used to influence the point generation process, particularly when using edge-based point distribution. It defines the sensitivity to edges in the image, with a lower threshold capturing more edges and a higher threshold capturing fewer. Adjusting this parameter can help emphasize or de-emphasize certain features in the image.

color_mode

The color_mode parameter specifies how the colors of the triangles are determined. Different modes can be used to achieve various artistic effects, such as averaging the colors within each triangle or using the color of a specific point. This parameter allows you to control the color dynamics of the triangulated image.

point_distribution

The point_distribution parameter defines the method used to distribute points across the image. Options include "edge_based" for edge-sensitive distribution and "grid" for a more uniform distribution. The choice of distribution affects the overall look of the triangulated image, with edge-based distribution often highlighting image features and grid distribution providing a more regular pattern.

triangle_outline

The triangle_outline parameter is a boolean that determines whether the outlines of the triangles should be drawn in the output image. Enabling this option can add a distinct geometric pattern to the image, enhancing the visual separation between triangles.

outline_thickness

The outline_thickness parameter specifies the thickness of the triangle outlines when triangle_outline is enabled. A thicker outline can make the geometric pattern more pronounced, while a thinner outline offers a subtler effect. This parameter allows for fine-tuning the visual impact of the outlines.

smoothing

The smoothing parameter controls the level of smoothing applied to the final triangulated image. A higher smoothing value can soften the edges and transitions between triangles, creating a more blended and cohesive look. This can be useful for achieving a more polished and less jagged appearance.

🔺 Triangulate Output Parameters:

result_tensor

The result_tensor is the output of the TriangulateNode, representing the triangulated version of the input image. It is returned as a tensor, which can be further processed or converted to other formats as needed. This output captures the geometric transformation applied to the original image, providing a unique and stylized visual effect.

🔺 Triangulate Usage Tips:

  • Experiment with different num_points values to find the right balance between detail and abstraction for your specific image and artistic goals.
  • Use the edge_threshold parameter to emphasize important features in the image, especially when using edge-based point distribution.
  • Try different color_mode settings to achieve various artistic effects and enhance the visual appeal of the triangulated image.

🔺 Triangulate Common Errors and Solutions:

Image shape mismatch

  • Explanation: The input image does not have the expected shape, which can cause issues during processing.
  • Solution: Ensure that the input image is provided as a tensor with the correct dimensions, typically in the format (batch_size, height, width, channels).

Insufficient points for triangulation

  • Explanation: The number of points specified is too low to perform effective triangulation.
  • Solution: Increase the num_points parameter to ensure there are enough points to create a meaningful triangulation.

Invalid point distribution method

  • Explanation: An unsupported point distribution method was specified.
  • Solution: Use one of the supported methods, such as "edge_based" or "grid", for the point_distribution parameter.

🔺 Triangulate Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Image-Effects
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 Playground, enabling artists to harness the latest AI tools to create incredible art.