> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# PadImageNode - ComfyUI Built-in Node Documentation

> 用纯色或图像边缘的镜像副本为图像填充边距。填充量可以按每侧的精确像素数设置，也可以按尺寸倍数设置，或设置为使宽度和高度能被某个数字整除的最小填充量——这在保存或平铺图像之前非常实用。

用纯色或图像边缘的镜像副本为图像填充边距。填充量可以按每侧的精确像素数设置，也可以按尺寸倍数设置，或设置为使宽度和高度能被某个数字整除的最小填充量——这在保存或平铺图像之前非常实用。原始图像保持原有位置：`left` 和 `top` 填充添加在它之前，`right` 和 `bottom` 填充添加在它之后。

## 输入

| 参数 | 说明 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `image` | 要填充的图像。 | IMAGE | 是 | - |
| `padding_type` | 添加多少填充：`"pad dimensions"` 表示按每侧的精确数量填充，`"pad by multiplier"` 表示按相对于输入的输出尺寸填充，`"pad to multiple"` 表示填充至下一个倍数。选择某个选项后会显示其对应的参数。 | DYNAMIC\_COMBO | 是 | `"pad dimensions"` `"pad by multiplier"` `"pad to multiple"` |
| `left` | 在左侧添加的像素数。当 `padding_type` 为 `"pad dimensions"` 时可用（默认：0）。 | INT | 是 | 0 到 16384 |
| `top` | 在顶部添加的像素数。当 `padding_type` 为 `"pad dimensions"` 时可用（默认：0）。 | INT | 是 | 0 到 16384 |
| `right` | 在右侧添加的像素数。当 `padding_type` 为 `"pad dimensions"` 时可用（默认：0）。 | INT | 是 | 0 到 16384 |
| `bottom` | 在底部添加的像素数。当 `padding_type` 为 `"pad dimensions"` 时可用（默认：0）。 | INT | 是 | 0 到 16384 |
| `multiplier` | 相对于输入的输出尺寸，例如 1.5 表示在每侧增加 25%。填充量会在相对的边之间平均分配。当 `padding_type` 为 `"pad by multiplier"` 时可用（默认：1.0）。 | FLOAT | 是 | 1.0 到 8.0（步长 0.01） |
| `multiple` | 填充使宽度和高度能被此数字整除。填充量在相对的边之间平均分配，多出的像素分配到右侧和底部。当 `padding_type` 为 `"pad to multiple"` 时可用（默认：32）。 | INT | 是 | 1 到 16384 |
| `padding_style` | 填充区域的填充方式：`"color"` 或 `"mirror image"`。选择某个选项后会显示其对应的参数。 | DYNAMIC\_COMBO | 是 | `"color"` `"mirror image"` |
| `color` | 填充区域的填充颜色；alpha 会被忽略。当 `padding_style` 为 `"color"` 时可用（默认：`"#000000"`）。 | COLOR | 是 | - |
| `feathering` | 在有填充的边上，将图像边缘的这么多像素与填充颜色混合。0 表示保留硬边缘。当 `padding_style` 为 `"color"` 时可用（默认：0）。 | INT | 是 | 0 到 16384 |

`"mirror image"` 会反射图像边缘，而不是用颜色填充。边缘像素不会被重复，当填充的宽度或高度超过图像本身时，镜像图像会重复出现以覆盖剩余区域。当所有填充量都为 0 时，将原样返回输入图像。

## 输出

| 输出名 | 说明 | 数据类型 |
| - | - | - |
| `image` | 填充后的图像，其批次维度和通道数与输入一致。 | IMAGE |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/PadImageNode/zh.md)

***

**Source fingerprint (SHA-256):** `9373cd6aa287befba74374b9b2a6c38b20344b5715e9aaa4cf49282ae930c91d`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.