凤希AI - 图像管理器 - 获取批量单图
Pull one frame out of a batch — with its mask and dimensions attached
- 图片列表
- 遮罩列表
- 单张图片
- 单张遮罩
- 宽度
- 高度
Batch processing is great until you need one frame. You've loaded 20 reference images, and now you want frame 7 alone - as a start-frame anchor, a control image, or a preview. Slicing that out of a batch tensor by hand is annoying in a node graph, which is exactly the gap FxAiImageGetSingle fills. It takes an image list and its matching mask list, pulls one frame by index, and hands you the single image, the single mask, and the width and height of what you got.
The name tells you where it sits in the pack: it's the "图像管理器 - 获取批量单图" node, the single-frame companion to the batch loaders, and it's built to understand both data formats this pack produces.
How it works
You feed it 图片列表 and 遮罩列表 plus 选取索引. The node checks what it actually received - a native ComfyUI batch tensor ([B, H, W, C]) or the pack's Python-list-of-frames format - and handles both. It then picks index 选取索引 % total, so an index past the end of the list wraps around instead of crashing. That modulo behavior is the one thing to remember, because it's a silent trap: index 5 on a 5-frame list gives you frame 0, not an error.
The outputs are 单张图片, 单张遮罩, and two INTs, 宽度 and 高度, read directly from the selected frame's shape. The width/height outputs are the quiet workhorses - wire them into a size-config node or a resolution math node and you never have to type the numbers in again.
Inputs and outputs
Required: 图片列表, 遮罩列表, 选取索引 (default 0, max 9999). Outputs: 单张图片 (IMAGE), 单张遮罩 (MASK), 宽度 (INT), 高度 (INT).
Installing it
Part of fxai-toolkit (凤希AI, MIT). Install via ComfyUI Manager (search "fxai-toolkit") or:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
# restart ComfyUI
No models. The pack auto-installs soundfile and psutil on first load. Chinese labels; support via QQ group 775649071 and Bilibili.
Where people get burned
The modulo wrap is the trap - index out of range silently becomes a different frame, so double-check your index against the count output from your loader. The mask input is required on the schema, which trips people who don't have masks: if your loader doesn't produce a mask list, feed the mask output of a matching batch loader (the pack's batch-load node emits one), because leaving the socket empty will stop the run. And note this node keeps the frame's original dimensions - it doesn't resize, so the width/height outputs are just telling you what's already there.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| 图片列表 | IMAGE | — | |
| 遮罩列表 | MASK | — | |
| 选取索引 | INT | 00–9999 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| 单张图片 | IMAGE | — |
| 单张遮罩 | MASK | — |
| 宽度 | INT | — |
| 高度 | INT | — |