ComfyUI/tests-unit/comfy_extras_test
Dante a0a64c679f
Add Number Convert node (#13041)
* Add Number Convert node for unified numeric type conversion

Consolidates fragmented IntToFloat/FloatToInt nodes (previously only
available via third-party packs like ComfyMath, FillNodes, etc.) into
a single core node.

- Single input accepting INT, FLOAT, STRING, and BOOL types
- Two outputs: FLOAT and INT
- Conversion: bool→0/1, string→parsed number, float↔int standard cast
- Follows Math Expression node patterns (comfy_api, io.Schema, etc.)

Refs: COM-16925

* Register nodes_number_convert.py in extras_files list

Without this entry in nodes.py, the Number Convert node file
would not be discovered and loaded at startup.

* Add isfinite guard, exception chaining, and unit tests for Number Convert node

- Add math.isfinite() check to prevent int() crash on inf/nan string inputs
- Use 'from None' for cleaner exception chaining on string parse failure
- Add 21 unit tests covering all input types and error paths
2026-03-24 15:38:08 -07:00
..
__init__.py
image_stitch_test.py [V3] converted nodes_images.py to V3 schema (#11206) 2025-12-26 19:39:02 -08:00
nodes_math_test.py feat: add Math Expression node with simpleeval evaluation (#12687) 2026-03-05 18:51:28 -08:00
nodes_number_convert_test.py Add Number Convert node (#13041) 2026-03-24 15:38:08 -07:00