Skip to content

"Many fixes"#224

Merged
Glat0s merged 1 commit into
VisoMasterFusion:devfrom
Elricfae:dev
May 8, 2026
Merged

"Many fixes"#224
Glat0s merged 1 commit into
VisoMasterFusion:devfrom
Elricfae:dev

Conversation

@Elricfae
Copy link
Copy Markdown
Contributor

@Elricfae Elricfae commented May 8, 2026

📋 Summary of Changes

This PR introduces critical bug fixes and performance optimizations across multiple processing pipelines:

🐛 Bug Fixes

  • Keypoint scaling: Fixed hardcoded centroid (255, 255) with dynamic barycenter calculation to prevent unwanted drift on off-center faces
  • Face detection sorting: Replaced linear confidence/area heuristic with non-linear squared-confidence weighting to properly filter bad rotation artifacts
  • Manual rotation reversal: Fixed expand=True handling with proper center-crop and corrected inverse rotation matrix math for all coordinate systems
  • Face landmark alignment: Added automatic tilt angle detection and correction in fallback mode using eye keypoint positioning
  • Mouth alignment: Replaced fragile pixel-top anchoring with statistical boundary anchoring (mean + 1.5σ) for temporal stability
  • Tensor race conditions: Replaced .from_numpy().to() with direct torch.tensor(..., device=device) to prevent CPU-GPU synchronization issues
  • PyTorch tensor handling: Added safe CUDA→CPU conversion in keypoint degeneracy checks

⚡ Performance Improvements

  • CUDA stream removal: Disabled per-worker local streams (fixes VRAM explosion with OnnxRuntime)
  • Landmark reuse logic: Intelligent reuse of 203-point landmarks to avoid redundant neural network forward passes
  • Pure GPU control flow: Replaced CPU-side conditions with GPU tensor logic to eliminate sync points
  • Thumbnail caching: Re-enabled batch thumbnail processing during workspace loading

🔧 Minor Improvements & UI Fixes

  • Denoiser seed validation: Corrected minimum valid seed value from 1 to 0
  • Border mask default: Enabled by default to prevent black artifacts
  • Workspace state isolation: Snapshot control parameters to prevent race conditions during async media loading
  • Code cleanup: Removed obsolete tracking logic comment and fixed code formatting

@Elricfae Elricfae added the patch Bug fixes, documentation, refactors, dependency updates label May 8, 2026
@Glat0s Glat0s merged commit edee0a0 into VisoMasterFusion:dev May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bug fixes, documentation, refactors, dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants