凤希AI - 宽高-按照片预设
FxAiPhotoSizeConfig
- 宽度
- 高度
FxAiPhotoSizeConfig is a boring-looking utility with one genuinely useful idea buried in it: photo-print presets as canvas sizes. Instead of typing 2304×2880 because you happen to need a 10-inch print, you pick "10寸 2304×2880" from a dropdown and get two clean INTs on the other side. If your workflow is 证件照 (ID photo) generation - and this pack ships whole example workflows for exactly that, like the "单图生成(头像-证件照)" graph - this node is the dimension source that feeds EmptyLatentImage or an edit-model encode node.
The mechanism is trivial, which is the appeal. It's a pure function: pick a mode, get a width and height. The 尺寸设置 toggle decides which path you're on. Set it to 自定义宽高 (custom) and your 宽度 and 高度 widgets are what come out. Set it to 选择预设 (select preset) and it parses the number out of the 预设 string you chose - the presets encode their own resolution, so "6寸(4R) 1280×1792" becomes w=1280, h=1792. The 反转 checkbox swaps width and height before output, which is the handy bit: generate a portrait ID photo, flip it for a landscape canvas, without touching the preset.
Outputs are just 宽度 and 高度 (INT). That's the whole surface. Wire them into an EmptyLatentImage, an ImageScale, or any width/height input that takes INTs.
Two things to know before you reach for it. First, the preset list is Chinese photo-print naming: 1寸/大一寸/2寸 are Chinese ID-photo sizes, then 5寸(3R) through 10寸 are print standards, then square/portrait/landscape canvas sizes. The default is 正方形 1024×1024, which is a fine safe start. Second, the width/height widgets clamp to 64–8192 in steps of 8 - that step-of-8 constraint matters, since most 2026 video models and the Qwen edit family want dimensions aligned to 8 (or 16), and this enforces it for you.
Honestly? This is a "nice to have" node. If you never generate at print sizes, ComfyUI's built-in size nodes cover you. But if you're running the pack's ID-photo or avatar workflows, everything is pre-wired to expect this node, and the presets save you from typo'd resolutions. It installs as part of fxai-toolkit (by 凤希AI / fxai.site) - ComfyUI Manager search "fxai-toolkit", or clone into custom_nodes/ and restart:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
There's also a V2 (FxAiPhotoSizeConfigV2) that drops the mode toggle and just keeps the presets and live width/height boxes - if you find the toggle confusing, that one's your upgrade path.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| 尺寸设置 | BOOLEAN | true | — |
| 预设 | COMBO | 正方形 1024×1024 | 11 options: 1寸证件照 256×384, 大一寸护照 384×560, 2寸证件照 416×576, 5寸(3R) 896×1280, 6寸(4R) 1280×1792, 7寸(5R) 1536×2176, +5 |
| 宽度 | INT | 102464–8192 | — |
| 高度 | INT | 102464–8192 | — |
| 反转 | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 宽度 | INT | — |
| 高度 | INT | — |