Files
1hew-ComfyUI-1hewNodes/web/docs/1hew_IntTextCount/en.md
T
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

1.8 KiB

Int Text Count - Count non-empty text-like inputs

Node Purpose: Int Text Count counts non-empty STRING / INT / FLOAT inputs from dynamic wildcard text_1..text_N ports. Emptiness follows Any Empty Bool: blank strings, 0 / 0.0, and False are ignored; True counts as one. Other value types (images, masks, audio, dictionaries, …) are not counted.

Inputs

Name Port Type Default Range Description
text_1 optional ANY (*) - - First text-like input; the frontend dynamically appends text_2..text_N as connections are made.

Outputs

Name Type Description
int INT Number of non-empty text-like inputs.

Features

  • Dynamic inputs: connecting the last text_X port automatically appends the next text port.
  • Wildcard ports: connect STRING, INT, or FLOAT (BOOLEAN is treated as an integer) to the same socket family.
  • Emptiness follows Any Empty Bool: "", whitespace-only strings, 0, 0.0, and False are empty.
  • List-aware: a string list (OUTPUT_IS_LIST, e.g. from List Custom String) contributes one count per non-empty element.
  • Single pass: list inputs are counted inside one execution instead of mapping the node per item.

Typical Usage

  • Optional text count: count how many reference texts or numeric parameters were actually supplied.
  • Dynamic parameters: drive downstream integer controls from the number of non-empty text inputs.

Notes & Tips

  • Because 0 counts as empty, a numeric zero is treated as "not provided". Use Any Empty Int if a different mapping is needed.
  • Non-text values are ignored rather than raising an error, so a stray IMAGE/MASK connection simply does not contribute.
  • The node does not measure character length or line count; it counts inputs.