Add Mac OS support for Apple Silicon (#770)

* Made an install script and auto updates env for mac

* GPU sensors and initial training working for MAC. Still WIP.

* Switch dataloader to single threaded until I can work around some mac pickeling issues.

* Get quantization working on mac

* Fix mac exclusive imports so they don't break other builds.

* Add mac instructions to the UI
This commit is contained in:
Jaret Burkett
2026-03-30 09:37:47 -06:00
committed by GitHub
parent bc47fd6755
commit 171535833a
25 changed files with 1072 additions and 71 deletions

View File

@@ -29,6 +29,9 @@ import platform
def is_native_windows():
return platform.system() == "Windows" and platform.release() != "2"
def is_macos():
return platform.system() == "Darwin"
if TYPE_CHECKING:
from toolkit.stable_diffusion_model import StableDiffusion
@@ -678,7 +681,7 @@ def get_dataloader_from_datasets(
dataloader_kwargs = {}
if is_native_windows():
if is_native_windows() or is_macos():
dataloader_kwargs['num_workers'] = 0
else:
dataloader_kwargs['num_workers'] = dataset_config_list[0].num_workers