Files
1hew 161b87e870 feat(release): 发布 v4.1.0,新增 Any to Any 与计数节点,增强 IO 与动态端口
- feat(conversion): 新增 Any to Any 通配透传节点
- feat(int): 新增 Int Mask/Audio/Text Count,并统一计数共享层
- feat(logic): Multi Switch Select 支持 a/all 全选
- feat(io): Load PS 预览默认开启并抑制 psd_tools INFO 噪音;Save Audio 默认 mp3,播放器兼容 Nodes 2.0
- fix(multi): Multi String Join 的 string_1 改为纯插槽,修复动态端口错位
- refactor(shared): 复用 parse_pad_color / pad_to_rgb
- docs: 同步中英文节点文档、README 列表与 v4.1.0 日志
- test: 新增/更新相关回归测试
2026-10-23 22:21:26 +08:00

33 lines
1.5 KiB
Markdown

# Int Image Count - Count valid images
**Node Purpose:** `Int Image Count` counts valid images from dynamic `image_1..image_N` inputs. Empty inputs, empty tensors, and fully black / all-zero images are ignored. It is useful for turning optional reference images into an integer parameter.
## Inputs
| Name | Port | Type | Default | Range | Description |
| ---- | ---- | ---- | ------- | ----- | ----------- |
| `image_1` | optional | IMAGE | - | - | First image input; the frontend dynamically appends `image_2..image_N` as connections are made. |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| `int` | INT | Number of valid images. |
## Features
- Dynamic inputs: connecting the last `image_X` port automatically appends the next image port.
- Validity check: disconnected values, empty tensors, and all-zero / black images are ignored.
- Batch-compatible: batched image inputs are checked and counted frame by frame.
- List-aware: list outputs are flattened, and each image/frame is checked independently.
## Typical Usage
- Reference image count: output the actual number of valid optional reference images.
- Dynamic parameters: drive downstream integer controls from the number of usable images.
## Notes & Tips
- The validity logic matches the reference-image filtering semantics used by `Gemini 3.1 Flash Image Preview`.
- If a pure black image should be treated as valid content, add a tiny non-zero value first or use another explicit counting method.