fix: improve Apple Silicon compatibility#26
Open
kesjam wants to merge 2 commits into
Open
Conversation
Key changes: - Force CPU usage instead of MPS for better stability - Use float32 instead of bfloat16 for better compatibility - Enable MPS fallback for unsupported operations - Disable TF32 optimizations - Simplify Gradio interface configuration - Add better error handling and debugging options Technical details: - Set PYTORCH_ENABLE_MPS_FALLBACK=1 - Modified device configuration in both demo scripts - Updated Gradio launch parameters for better stability - Added explicit output directory creation Testing notes: - Verified working on macOS with Apple Silicon - Tested successfully in Safari browser - Confirmed video-to-audio generation working - Access via http://127.0.0.1:7863
Owner
|
Hi, thank you for the pull request. Several questions:
|
hkchengrex
reviewed
Dec 31, 2024
Comment on lines
+41
to
+50
| try: | ||
| model: ModelConfig = all_model_cfg[args.variant] | ||
| if not model.model_path.exists(): | ||
| log.info(f'Downloading model weights for {args.variant}...') | ||
| model.download_if_needed() | ||
| output_dir = Path('./output/gradio') | ||
| output_dir.mkdir(exist_ok=True, parents=True) | ||
| except Exception as e: | ||
| log.error(f'Error loading model: {e}') | ||
| raise |
Owner
There was a problem hiding this comment.
download_if_needed already checks for existing model files and additionally checks for MD5
| parser.add_argument('--variant', | ||
| type=str, | ||
| default='large_44k_v2', | ||
| default='small_44k', |
Owner
There was a problem hiding this comment.
large_44k_v2 is a better default.
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.
Overview
This PR improves compatibility with Apple Silicon (M1/M2) Macs by addressing several MPS-related issues and improving stability.
Key Changes
Technical Details
Testing
Notes