Add CPU/GPU compatibility and automatic device selection#73
Open
JimmyOhn wants to merge 4 commits intojoonson:masterfrom
Open
Add CPU/GPU compatibility and automatic device selection#73JimmyOhn wants to merge 4 commits intojoonson:masterfrom
JimmyOhn wants to merge 4 commits intojoonson:masterfrom
Conversation
JimmyOhn
commented
Jul 30, 2025
Resolves memory issues and improves accessibility on CPU-only systems. - Add device parameter to SyncNetInstance with CPU as default - Implement automatic CUDA detection and fallback to CPU - Update all scripts (demo_syncnet.py, demo_feature.py, run_syncnet.py, run_pipeline.py) to use automatic device selection - Add device_utils.py for device management utilities - Modify S3FD face detector to support CPU/GPU selection - Ensure backward compatibility with existing CUDA setups - Enable SyncNet to run on systems without NVIDIA GPU
These changes maintain functionality while supporting modern NumPy/PyTorch versions. - Replace np.int with int in detectors/s3fd/box_utils.py - Replace tensor.view() with tensor.reshape() in SyncNetModel.py for PyTorch compatibility - Fix AttributeError: module 'numpy' has no attribute 'int' in newer NumPy versions - Ensure compatibility with NumPy 1.20+ where deprecated aliases were removed
Improves user guidance for hardware compatibility and troubleshooting. - Add comprehensive Device Support section to README.md - Document automatic CUDA detection and CPU fallback behavior - Provide instructions for forcing CPU-only execution - Explain device selection mechanism for different hardware setups - Add examples for both GPU-accelerated and CPU-only usage
Author
|
@joonson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.