-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve Apple Silicon compatibility #26
base: main
Are you sure you want to change the base?
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
Hi, thank you for the pull request. Several questions:
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
download_if_needed
already checks for existing model files and additionally checks for MD5
@@ -24,7 +24,7 @@ def main(): | |||
parser = ArgumentParser() | |||
parser.add_argument('--variant', | |||
type=str, | |||
default='large_44k_v2', | |||
default='small_44k', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
large_44k_v2
is a better default.
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