Skip to content
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

Improved macOS and Apple Silicon support #3084

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Developer-Ecosystem-Engineering

Improved handling of features unsupported on Apple Silicon:

  • Minimized code duplication when choosing and setting FP precision
  • Removed unsupported optimizers from the drop-down when running on Apple Silicon

Disabled features unsupported for Apple Silicon:

  • Made floating point precision UI non-interactive when running on Apple Silicon

Fixed bugs:

  • Fixed failure when training tries to resume after the previous crash and there are no necessary files in the training directory
  • Fixed UI issue when model type buttons are not displayed correctly when local/unrecognized model is selected
  • Fixed incorrect read of config setting for Dataset Preparation output directory

Enabled UI for running on Apple Silicon with MPS backend

  • common_gui.local_device(): either accelerate.Accelerator().device or None;
  • common_gui.device_list(): make a list of supported devices for the current system [fallback_device="cpu", local_device() if not None];
  • common_gui.default_device(): common_gui.local_device() or fallback_device="cpu";
  • common_gui.torch_device(): either common_gui.local_device() if torch supports it or fallback_device="cpu";
  • Changed device radio buttons to use common_gui.device_list() and common_gui.default_device() to replace hard-coded values;
  • Added Apple MPS check to setup_common.check_torch() to remove warning shown on Mac systems;
  • Deleted duplicate code validate_requirements.check_torch();
  • Removed xformers from requirements_macos_arm64.txt since xFormers supports Nvidia only and causes warnings and errors when running on Macs.

Improved handling of features unsupported on Apple Silicon:
- Minimized code duplication when choosing and setting FP precision
- Removed unsupported optimizers from the drop-down when running on Apple Silicon

Disabled features unsupported for Apple Silicon:
- Made floating point precision UI non-interactive when running on Apple Silicon

Fixed bugs:
- Fixed failure when training tries to resume after the previous crash and there are no necessary files in the training directory
- Fixed UI issue when model type buttons are not displayed correctly when local/unrecognized model is selected
- Fixed incorrect read of config setting for Dataset Preparation output directory

Enabled UI for running on Apple Silicon with MPS backend
- common_gui.local_device(): either accelerate.Accelerator().device or None;
- common_gui.device_list(): make a list of supported devices for the current system [fallback_device="cpu", local_device() if not None];
- common_gui.default_device(): common_gui.local_device() or fallback_device="cpu";
- common_gui.torch_device(): either common_gui.local_device() if torch supports it or fallback_device="cpu";
- Changed device radio buttons to use common_gui.device_list() and common_gui.default_device() to replace hard-coded values;
- Added Apple MPS check to setup_common.check_torch() to remove warning shown on Mac systems;
- Deleted duplicate code validate_requirements.check_torch();
- Removed xformers from requirements_macos_arm64.txt since xFormers supports Nvidia only and causes warnings and errors when running on Macs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant