Legacy workflows pass instance_id="default" (string) from old v1 nodes.
ComfyUI runs validate_inputs BEFORE execute(), so the in-node _coerce_int
fallback never fires — the workflow errors before reaching our handler.
Change schema input type from INT to STRING in both FaceDetectionNode (v3)
and FaceDetectionNodeV1 (fallback). instance_id is only used as a dict key
(f"{instance_id}"), never arithmetic, so the narrowing is safe.
- v3 schema: IntegerInput → StringInput
- v1 schema: ("INT", ...) → ("STRING", ...)
- Remove instance_id from _INT_DEFAULTS and VALIDATE_INPUTS INT loop
- Simplify coercion to str(instance_id) if not None else "0"
- Bump version 2.1.1 → 2.1.2
- Move temporal_smoothing, output_height, instance_id from required to
optional in INPUT_TYPES to prevent ComfyUI framework-level int()
coercion crash when legacy workflows pass string 'default' (from
classifier_type) into INT slots via positional widgets_values mapping
- Add _coerce_int() helper for safe string-to-int conversion with
fallback to defaults, applied defensively in v1 and v3 execute methods
- Enhance VALIDATE_INPUTS to intercept and validate all optional INT
inputs with graceful type coercion
- Update README to reflect v2.x features (temporal smoothing, aspect
ratios, auto-padding, batch processing, changelog)
- Bump version 2.1.0 → 2.1.1
- Fix .index() on numpy arrays in v3 individual face loop -> enumerate()
- Remove dead classifier_type param from detect_faces() (cascade already selected via CascadeCache)
- Change v1 RETURN_TYPES for face_metadata from IMAGE to FLOAT (is [B,6] bbox data, not image)
- Improve v3 face_metadata tooltip: NOT an image warning
- Remove unused import torch.nn.functional as F
- Remove unused import StringInput
- Replace _tensor_to_numpy() with _get_batch_dims() - removed dead img_np return
Fixes:
- Restore optional face_output_format param (strip/individual)
Invalid values (e.g. 'lbp') gracefully fallback to 'strip' with warning
Fixes 'Value not in list' validation error from stale v1.x workflows
- Restore optional padding param (legacy px-based, auto-converts to ratio)
- Fix all_faces mode: detect_faces() now returns ALL faces, not just largest
- Add VALIDATE_INPUTS to v1 wrapper for early invalid-value catching
- Set OUTPUT_NODE=True on both v3 schema and v1 class
- Fix _lock ClassVar type annotation syntax
- Add _resolve_face_output_format() for centralized format validation
- Proper strip/individual output handling in all_faces mode
Packaging:
- pyproject.toml: version 1.1.2 → 2.1.0, updated description and deps
- Removed Pillow and torchvision (no longer used)
- Bumped torch requirement to >=2.0.0
- Updated registry metadata (comfyui-manager-entry.json, node_list.json)
- Add face_output_format parameter with strip and individual options
- Extract duplicate processing logic into shared _process_individual_faces() method
- Document 512px size limitation and parameter interaction behavior
- Clarify that face_output_format only applies with output_mode=all_faces
- Support outputting multiple faces as separate batch items [N,H,W,C]
- Maintain backward compatibility with default strip format
- Update both ComfyUI v3 and v1/v2 implementations with robust fallbacks
- Add face_output_format parameter with strip and individual options
- Support outputting multiple faces as separate batch items [N,H,W,C]
- Maintain backward compatibility with default strip format
- Update both ComfyUI v3 and v1/v2 implementations
- Update documentation with new parameter details