> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 分辨率选择器（ResolutionSelector）

<div class="node-meta"><code>ResolutionSelector</code><span>utilities</span><span>角色：数值读取</span></div>

Resolution Selector 节点根据选定的宽高比和目标总分辨率（以百万像素为单位）计算像素宽度和高度。它可用于为其他节点（例如 Empty Latent Image 节点）生成一致的尺寸。

## 参数

| 参数             | 类型                 | 默认 / 范围                                                                      | 说明                                        |
| -------------- | ------------------ | ---------------------------------------------------------------------------- | ----------------------------------------- |
| `aspect_ratio` | COMBO              | 1:1 (Square)、2:3 (Portrait Photo)、3:2 (Photo)、3:4 (Portrait Standard) …共 8 项 | —                                         |
| `megapixels`   | FLOAT              | 0.1 \~ 16.0，步长 0.1                                                           | 按总像素缩放（如 1.0 = 约 1024×1024），比固定边长更适配不同比例。 |
| `multiple`     | INT                | 8 \~ 128，步长 4                                                                | 把宽高向上取整到该倍数，通常 8 或 64。                    |
| `preview`（选填）  | RESOLUTION_PREVIEW | —（连线输入）                                                                      | —                                         |

## 输出

| 输出     | 类型  | 说明 |
| ------ | --- | -- |
| width  | INT | 整数 |
| height | INT | 整数 |

## 怎么接

- **上游**：图像/潜空间/视频数据
- **下游**：任何 INT 参数口
- **接线**：输出的是数值，可接到任何同类型参数口（右键参数 →「转换为输入」）；常用来把图像尺寸、视频帧数动态传给下游，避免手改参数。

## 使用案例

从 `aspect_ratio`（1:1 (Square)）、`megapixels`（1.0）、`multiple`（8） 开始填就能跑起来。典型接法：`图像` → 本节点 → `任何 INT 参数口`。输出类型是 INT，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

![ResolutionSelector 端口与连线示意](/svg/ResolutionSelector.svg)

## 同类节点

[颜色转RGB整数](/nodes/10/ColorToRGBInt.md) · [数学表达式](/nodes/10/ComfyMathExpression.md) · [数字转换](/nodes/10/ComfyNumberConvert.md) · [创建边界框](/nodes/10/CreateBoundingBoxes.md) · [创建列表](/nodes/10/CreateList.md) · [曲线编辑器](/nodes/10/CurveEditor.md) · [自定义组合](/nodes/10/CustomCombo.md) · [GetItemFromList](/nodes/10/GetItemFromList.md) · [图像直方图](/nodes/10/ImageHistogram.md) · [预览任意](/nodes/10/PreviewAny.md) · [种子](/nodes/10/SeedNode.md)
