diff --git a/CHANGES.md b/CHANGES.md deleted file mode 100644 index 65c8323..0000000 --- a/CHANGES.md +++ /dev/null @@ -1,110 +0,0 @@ -# Changes Summary - ComfyUI Face Shaper Update - -## Overview -This update synchronizes ComfyUIFaceShaper with the latest SVG, implementing refreshed ear geometry, integrating the nose tip control within the main nose path, and removing obsolete nose_tip geometry/settings. - -## Changes Implemented - -### A) Updated Ear Geometry -- **Replaced ear coordinates**: Updated `ear_left` and `ear_right` with new SVG-derived, viewBox-normalized coordinates from path184 (which contains both ears in 2 subpaths) - - `ear_left`: 5 points starting at (0.187500, 0.484375) - left ear, subpath 1 - - `ear_right`: 5 points starting at (0.796875, 0.609375) - right ear, subpath 2 -- **Maintained controls**: Existing ear controls (pos_x/pos_y, size_x/size_y) remain functional -- **Transform pipeline**: Ears are transformed via centroid → scale → position offsets → pixel conversion -- **Rendering**: Drawn with `draw.line` using existing stroke logic - -### B) Removed Obsolete nose_tip Geometry -- **Removed from FEMALE_FACE**: Deleted separate `nose_tip` geometry (5 points) -- **Removed INPUT_TYPES settings**: - - `nose_tip_size_x` (FLOAT, was default 1.0, min 0.5, max 2.0) - - `nose_tip_size_y` (FLOAT, was default 1.0, min 0.5, max 2.0) -- **Updated method signature**: Removed `nose_tip_size_x` and `nose_tip_size_y` from `draw_face()` parameters -- **Removed rendering code**: Deleted separate nose_tip drawing section -- **Updated settings_list**: Adjusted import/export indices (now 57 parameters instead of 59) - -### C) Integrated Nose Tip Control -- **Kept nose_tip_pos_y**: Single control parameter (FLOAT, default 0.0, min -0.2, max 0.2, step 0.005) -- **Updated nose geometry**: 13 points from SVG path46 (was 11 points) -- **Identified tip points**: Indices 5, 6, 7 are the 3 middle-most, lowest-Y points of the nose polyline - - Index 5: (0.487500, 0.656250) - left tip - - Index 6: (0.500000, 0.659375) - center point (lowest) - - Index 7: (0.512500, 0.656250) - right tip -- **Applied offset**: `nose_tip_pos_y` is applied ONLY to these 3 points after nose scaling and position transforms, before pixel conversion -- **Single draw call**: Nose is still drawn exactly once with `draw.line()` - -### D) Settings List Updates -- **SETTINGS_LIST_LENGTH**: Still 60 (for future expansion) -- **Actual parameters**: 57 (55 feature controls + 2 canvas dimensions) - - Previously: 59 parameters - - Reduction: Removed 2 nose_tip size controls -- **Updated indices**: All parameters after nose_tip_pos_y shifted down by 2 - - `nose_tip_pos_y`: index 49 - - `camera_distance`: index 50 (was 52) - - `camera_pos_x`: index 51 (was 53) - - `camera_pos_y`: index 52 (was 54) - - `fov_mm`: index 53 (was 55) - - `line_thickness`: index 54 (was 56) - - `canvas_width`: index 55 (was 57) - - `canvas_height`: index 56 (was 58) - -## Validation Results - -All validation checks passed: -- ✓ FEMALE_FACE dictionary updated correctly -- ✓ INPUT_TYPES parameters correct -- ✓ draw_face signature correct -- ✓ Nose rendering logic correct (single draw call with integrated tip control) -- ✓ Settings list handling correct - -## Backward Compatibility - -**Breaking Changes**: -- Any code passing `nose_tip_size_x` or `nose_tip_size_y` will need to remove those parameters -- Settings lists exported with the old format (59 params) can still be imported but indices 50-51 will be ignored - -**Maintained**: -- Node name/category unchanged: CATEGORY="face", display name "Face Shaper" -- All other controls remain the same -- Settings export/import/reset behaviors intact -- Default sliders reproduce the updated SVG exactly - -## Files Modified - -1. `face_shaper.py`: - - Updated docstring - - Updated FEMALE_FACE dictionary (ears, removed nose_tip) - - Updated INPUT_TYPES (removed nose_tip sizes) - - Updated draw_face signature - - Updated settings import section - - Updated nose rendering with integrated tip control - - Removed separate nose_tip rendering - - Updated settings export list - - Updated SETTINGS_LIST_LENGTH comment - -2. `test_implementation.py`: - - Updated test expectations for new geometry - - Updated test expectations for removed parameters - - Updated parameter count (57 instead of 59) - -3. `validate_changes.py` (new): - - Comprehensive validation script for all changes - - Can run without full dependencies - -## Testing - -Run validation: -```bash -python3 validate_changes.py -``` - -Run tests (requires numpy, torch, PIL): -```bash -python3 test_implementation.py -``` - -## Visual Changes - -With default settings: -- Ears now appear in their updated positions from the latest SVG -- Nose renders identically to before (tip integrated, no visual change at default) -- Adjusting `nose_tip_pos_y` moves only the 3 tip points up/down subtly