ComfyUI > Nodes > ComfyUI_KimNodes > 🍒Icon_Position_Cropper / 图标位置裁剪

ComfyUI Node: 🍒Icon_Position_Cropper / 图标位置裁剪

Class Name

Icon_Position_Cropper

Category
🍒 Kim-Nodes/🧩Icon Processing | 图标处理
Author
Kim (Account age: 2536days)
Extension
ComfyUI_KimNodes
Latest Updated
2025-09-22
Github Stars
0.05K

How to Install ComfyUI_KimNodes

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

🍒Icon_Position_Cropper / 图标位置裁剪 Description

Icon_Position_Cropper automates precise image cropping using positional data for consistent extraction.

🍒Icon_Position_Cropper / 图标位置裁剪:

The Icon_Position_Cropper node is designed to facilitate the precise cropping of images based on specified positional data. This node is particularly useful for AI artists who need to extract specific sections of an image, such as icons or other graphical elements, by defining the coordinates of the desired area. By leveraging this node, you can automate the process of isolating parts of an image, which is especially beneficial when dealing with large batches of images or when the cropping needs to be consistent across multiple images. The node uses positional data to determine the four corner points of the cropping area, ensuring that the extracted section is accurate and aligned with your specifications. This functionality is crucial for tasks that require high precision, such as preparing assets for UI design or creating datasets for machine learning models.

🍒Icon_Position_Cropper / 图标位置裁剪 Input Parameters:

图片

This parameter represents the image to be processed and must be provided as a torch.Tensor. The image serves as the source from which specific sections will be cropped based on the positional data. Ensuring the image is in the correct format is crucial for the node to function properly.

位置数据

The 位置数据 parameter contains the positional information necessary for determining the cropping area. This data should include details about the coordinates and dimensions of the sections to be cropped. It is essential for guiding the node in identifying the correct areas of the image to extract.

起始列号

This integer parameter specifies the starting column number for the cropping operation. It defines the horizontal boundary from which the cropping begins. The default value is 0, with a minimum of 0 and a maximum of 100, allowing you to adjust the starting point as needed.

终止列号

Similar to 起始列号, this integer parameter sets the ending column number, marking the horizontal boundary where the cropping ends. The default value is 8, with a range from 0 to 100, providing flexibility in defining the cropping area.

行号

The 行号 parameter determines the row number up to which the cropping should occur. It sets the vertical boundary for the cropping operation. With a default value of 8 and a range from 0 to 100, this parameter helps in fine-tuning the vertical extent of the cropped area.

🍒Icon_Position_Cropper / 图标位置裁剪 Output Parameters:

裁切后图像

The output parameter 裁切后图像 represents the cropped image resulting from the node's operation. This output is an image tensor that contains only the section of the original image defined by the input positional data. It is crucial for tasks that require isolated image sections, such as icon extraction or dataset preparation.

🍒Icon_Position_Cropper / 图标位置裁剪 Usage Tips:

  • Ensure that the 位置数据 is accurate and corresponds to the image dimensions to avoid incorrect cropping results.
  • Use the 起始列号, 终止列号, and 行号 parameters to precisely define the cropping area, especially when dealing with images of varying sizes.
  • Verify that the input image is a torch.Tensor to prevent errors during processing.

🍒Icon_Position_Cropper / 图标位置裁剪 Common Errors and Solutions:

"位置数据为空,无法进行裁切"

  • Explanation: This error occurs when the positional data required for cropping is missing or not provided.
  • Solution: Ensure that the 位置数据 parameter is correctly populated with the necessary positional information before executing the node.

"图片必须是 torch.Tensor 类型"

  • Explanation: This error indicates that the input image is not in the expected torch.Tensor format.
  • Solution: Convert the image to a torch.Tensor format before passing it to the node to ensure compatibility.

🍒Icon_Position_Cropper / 图标位置裁剪 Related Nodes

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