Commit Graph
21 Commits
Author SHA1 Message Date
grmchn 3f3fcf3a28 Add PoseData to pose_keypoint converter node 2025-12-13 15:10:42 +09:00
grmchnandClaude a2e991ad8d Change ProportionChangerDWPoseRender show_face default to False
- Set show_face parameter default from True to False in render_nodes.py
- Provides cleaner pose visualization by default without face keypoints
- Users can still enable face rendering manually when needed

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 15:52:06 +09:00
gear_machineandClaude 5777eeac20 Improve error handling and reduce verbose logging across KeyPoint processing nodes
- Enhanced error handling with specific exception types in detector and interpolation nodes
- Reduced verbose console output in KeyPoint Denoiser components for cleaner operation
- Improved coordinate validation and array bounds checking in detector nodes
- Translated comments to English in params node for consistency
- Maintained core functionality while improving user experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-28 06:58:02 +09:00
gear_machineandClaude c4e9a567fa Fix ProportionChangerReference ankle and toe scaling bug
Fixed double offset issue where left/right ankles and toes were being
processed twice in proportion transformation, causing extreme stretching
to screen bottom.

Changes:
- Left ankle (keypoint 10): Only moves in ll1 processing, skip ll2
- Right ankle (keypoint 13): Only moves in rl1 processing, skip rl2
- Left toe (keypoint 19): Only moves in ll1 processing, skip ll2
- Right toe (keypoint 18): Only moves in rl1 processing, skip rl2
- Applied fixes across all processing functions: apply_batch_proportion_changes, batch loop, apply_proportion_changes
- Added debug logging to track ankle movements during processing

Root cause: Ankles/toes should move as child nodes with knees, not receive
independent l2/r2 adjustments which caused abnormal ratio values (e.g. rl2_ratio: 4.72)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 17:04:19 +09:00
gear_machineandClaude 4523ed0b49 Temporarily disable KeyPoint Denoiser nodes due to Kalman filter stability issues
### Changes
- Comment out ProportionChangerKeypointDenoiser and ProportionChangerKeypointDenoiserAdvanced in nodes.py
- Keep full algorithm implementation in proportion_changer/keypoint_denoiser/ for future development

### Issues Identified
- Kalman filter observation acceptance rate too low (1.7-6.1%)
- Mahalanobis distances abnormally high (thousands to millions)
- Keypoint drift phenomenon causing human shape distortion
- Constant velocity model inappropriate for human motion

### Technical Details
- Root cause: Inappropriate process noise vs observation noise balance
- Secondary issues: Velocity model persistence causing drift
- Attempted fixes: Noise parameter tuning, velocity decay, gate threshold relaxation
- Result: Insufficient improvement, fundamental model revision needed

### Future Development
- Consider position-only models or adaptive filtering approaches
- Evaluate LSTM/Transformer-based alternatives for human motion
- Implement robust statistical methods (median filtering)
- Add motion type classification for specialized optimization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 14:28:43 +09:00
gear_machineandClaude 77be25d936 Reorganize ProportionChanger Params UI layout for better UX
- Reorder parameters in anatomical sequence: body→face→hand→global
- Group body keypoints from head to legs (head→neck→shoulder→arm→torso→pelvis→leg)
- Group face keypoints from top to bottom (face_shape→eyebrow→eye→nose→mouth)
- Move face_shape_scale to top of face section as requested
- Clarify that eye_distance_scale belongs to face keypoints, not body
- Add clear section comments for better organization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 11:01:33 +09:00
gear_machineandClaude 045e769fa7 Fix node naming and input requirements for better UX
- Rename KeyPoint Denoiser nodes to shorter "Denoiser" names
- Move Advanced Denoiser to main ProportionChanger category
- Fix DWPose Render node: move pose_keypoint to required inputs
- Ensure proper parameter ordering for ComfyUI compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 07:49:07 +09:00
gear_machineandClaude d2a7ec38a5 Implement KeyPoint Denoiser with Kalman filter-based noise reduction (Issue024)
- Add sophisticated 7-stage denoising pipeline using Kalman filters
- Support temporal smoothing for dance video pose keypoints
- Include two ComfyUI node variants: basic and advanced parameter control
- Comprehensive error handling and fallback to original data on errors
- Performance: 4-8ms/frame with 90%+ observation acceptance rates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 19:16:51 +09:00
gear_machineandClaude 7c70d7fc0f Fix Issue019: Remove deprecated DWPose detector nodes properly
- Remove ProportionChangerUniAnimateDWPoseDetector from nodes.py and mappings
- Remove ProportionChangerUniAnimateDWPoseDetector from proportion_changer module
- Delete ProportionChangerUltimateUniAnimateDWPoseDetector class (973 lines)
- Delete ProportionChangerDWPoseDetectorForPoseKeypoint class (462 lines)
- Clean up NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS
- Preserve ProportionChangerDWPoseDetector and ProportionChangerDWPoseRender
- Total: 908 lines removed, codebase significantly simplified

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 15:11:32 +09:00
gear_machineandClaude 93d1e1c31b Implement ProportionChanger Interpolator with simplified specification (Issue017)
- Add ProportionChangerInterpolator node with streamlined parameters
- Input: pose_keypoint (singular notation, batch processing supported)
- Parameters: method (simplified from interpolation_method), interpolation_frames (0-5)
- Fixed internal parameters: momentum_weight=0.5 for cleaner UI
- Support 4 interpolation methods: linear, ease_in_out, bezier, momentum
- Complete ComfyUI integration with proper node mappings
- Include comprehensive standalone test suite

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 14:21:23 +09:00
gear_machineandClaude 0fc3eba017 Fix reference canvas scaling bug in ProportionChangerReference (Issue023)
Remove duplicate canvas size scaling logic that caused incorrect keypoint
positions when reference and target images had different canvas sizes.
The coordinate conversion functions already handle canvas scaling properly,
so additional scaling resulted in double scaling and malformed output.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 00:22:53 +09:00
gear_machineandClaude b362e0f7ca Complete WanVideo pose_extract algorithm port with advanced face processing (Issue022)
Major improvements to ProportionChanger Reference node:

**WanVideo Algorithm Complete Port:**
- Implement all 15-section proportion calculations (neck, shoulders, arms, head, legs)
- Fix neck fixed movement issue with unified ratio calculation from first frame
- Add batch processing with consistent ratios across all frames
- Port noise reduction and correction processing from WanVideo

**Advanced Face Processing Integration:**
- Implement independent X/Y face scaling based on ear distance and face dimensions
- Add nose-to-chin height calculation for natural face proportions
- Perfect nose-to-nose alignment between body and face keypoints
- Fix face positioning issue (was aligned to chest/neck, now to nose)

**Technical Improvements:**
- Unified batch processing: calculate ratios from first frame, apply to all frames
- Complete final position offset implementation for frame consistency
- Enhanced canvas size scaling compatibility
- Robust fallback mechanisms for various keypoint configurations

Resolves neck movement issues, face scaling problems, and noise artifacts.
Face now perfectly aligns with body nose position across all frames.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 00:08:14 +09:00
gear_machineandClaude 665d266c96 Fix batch processing compatibility in ProportionChangerReference node (Issue019)
- Modified ProportionChangerReference to support batch processing for multiple frames
- Fixed KeyError in result_keypoint access by handling dict return type correctly
- Each frame in the batch is now processed individually through the proportion changing algorithm
- Maintains compatibility with existing single-frame workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 13:33:06 +09:00
gear_machineandClaude 518cdf1aca Fix eye scaling to use face keypoint centroid as origin (Issue015)
- Eye groups (Left_Eye, Right_Eye) now scale around their own face keypoint centroid
- Other face parts (eyebrow, mouth, nose) continue using nose tip as center
- Removed debug print statements for cleaner output
- Move Issue015 to closed folder

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 18:59:17 +09:00
gear_machineandClaude 081f9b3e6b Implement comprehensive toe/heel keypoint scaling with corrected indices
- Fix DWPose keypoint mapping based on actual data structure:
  - LHip: 8→11, RHip: 11→8
  - LKnee: 12→9, RKnee: 9→12
  - LAnkle: 13→10, RAnkle: 10→13
  - RBigToe: 18, LBigToe: 19
- Add ankle-based toe/heel scaling with natural leg proportion
- Implement hand keypoint following for wrist movement during arm scaling
- Clean up code comments to English and remove debug logs
- Update CLAUDE.md with correct keypoint indices and code comment policy

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 17:36:25 +09:00
gear_machineandClaude 63724bfb59 Implement ProportionChanger Params node for direct POSE_KEYPOINT editing
✨ Features:
- Direct pose keypoint manipulation without image rendering
- Body part scaling: pelvis, torso, neck, head, shoulders, arms, legs
- Face detail adjustments: eye distance, eye/eyebrow height and scaling, mouth, nose, face shape
- Hand scaling with wrist-based reference
- Global transformations: overall scale, rotation, translation

🔧 Technical Implementation:
- Independent transformation calculations to prevent parameter interference
- Deep copy protection to avoid memory reference sharing issues
- ComfyUI cache bypass with IS_CHANGED method
- Hierarchical transformation order: pelvis → torso → neck → shoulders → arms/legs/head
- OpenPose standard face keypoint group definitions

🐛 Bug Fixes:
- Fixed shoulder_scale + arm_scale interference (parameters now apply independently)
- Resolved memory reference sharing causing persistent changes across runs
- Fixed overall_scale not applying due to missing condition check
- Implemented proper face keypoint processing (was placeholder)

📦 Files Added:
- proportion_changer/params_node.py: Main ProportionChangerParams node implementation
- Updated nodes.py and __init__.py for proper node registration

🎯 Usage:
Input: POSE_KEYPOINT → ProportionChanger Params → Output: Modified POSE_KEYPOINT
Compatible with all other ProportionChanger nodes for chained processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 13:51:43 +09:00
gear_machineandClaude 9bdfc7354d Fix extra_pnginfo errors and implement debug log control system
- Fix extra_pnginfo type errors with automatic dict→list conversion
- Add environment variable PROPORTION_CHANGER_DEBUG for log control
- Replace print-based debug logs with conditional logging system
- Disable verbose debug output in legacy unianimate modules
- Resolve circular import issues with local debug_log implementations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 12:33:21 +09:00
gear_machineandClaude d585488833 Unify node names and variable naming conventions
- Rename ProportionChanger Ultimate → ProportionChanger Reference
- Rename ProportionChanger DWPose Detector for PoseKeypoint → ProportionChanger DWPose Detector
- Standardize variable names: processed_pose_keypoint → changed_pose_keypoint
- Unify parameter naming: pose_keypoints → pose_keypoint (singular)
- Convert input parameter names to lowercase: POSE_KEYPOINT → pose_keypoint
- Update all NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS
- Fix comment references to use new class names

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 11:30:25 +09:00
gear_machineandClaude a4b31faf47 Remove unused score_threshold parameter from ProportionChanger Ultimate
The score_threshold parameter was defined in INPUT_TYPES but never used in the
actual proportion changing algorithm. This removal simplifies the UI and
prevents user confusion about a parameter that has no effect.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 11:13:59 +09:00
gear_machineandClaude 2f49f45aff Fix ProportionChanger Ultimate canvas size scaling issue
- Fix double scaling bug when target and reference images have different canvas sizes
- Remove redundant canvas scaling from proportion processing
- Coordinate conversion functions already handle canvas size differences automatically
- Resolves issue where 512x512 reference → 1024x1024 target produced coordinates outside canvas bounds
- Add test directory to .gitignore for development testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 07:46:04 +09:00
gear_machineandClaude 142f043a63 Fix import structure: resolve nodes.py/nodes/ directory naming conflict
- Rename nodes/ directory to proportion_changer/ following ComfyUI conventions
- Update __init__.py to use simple relative imports instead of importlib.util
- Fix nodes.py imports to reference .proportion_changer instead of .nodes
- Resolve ImportError caused by Python module vs package name collision
- Follow established ComfyUI custom node patterns (similar to adv_control/)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 05:44:00 +09:00