Graphonomy icon indicating copy to clipboard operation
Graphonomy copied to clipboard

feat: rebuild MPS-compatible inference and image blending modules fro…

Open budescode opened this issue 3 months ago • 1 comments

…m scratch

  • Reimplemented inference_mac.py with full Metal (MPS) support for Apple Silicon
  • Restored and cleaned up multi-scale inference logic
  • Added new inference_image_blend.py for post-inference overlay visualization
  • Ensured compatibility with macOS file paths and project structure

budescode avatar Oct 06 '25 18:10 budescode

This PR adds Apple Silicon (MPS) support for running inference and introduces a new image blending utility for visualizing human parsing results.

What’s new inference_mac.py → Metal (MPS) compatible inference script for macOS users

Detects and uses MPS backend (torch.device("mps"))

Fully compatible with existing CUDA workflow

inference_image_blend.py → Utility for overlaying original and parsed images

Generates smooth blended visualization results

Includes clear logs and automatic output directory creation

README.md update

Added macOS usage note and blending example

Why this change Enables native GPU acceleration on Apple M1/M2/M3 devices

Makes it easy to visualize segmentation results without external tools

Improves project accessibility and usability across platforms

budescode avatar Oct 06 '25 18:10 budescode