mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
* Remove PlaidML reference from readme files * Remove AMD option from installers * remove amd requirements and update setup.py * remove plaidml test from CI workflow * gpustats: remove plaidml backend * plaid removals: - faceswap.py - python version check - setup.cfg - plaidml typing ignore - lib.keras_utils - All plaid code - lib.launcher.py - All plaidml checks and configuration * remove tf2.2 specific code from GUI event reader * lib.model - remove all plaidml implementations * plugins.extract - remove plaidml code * plugins.train remove plaidml code * lib.convert - remove plaidml code * tools.model: remove plaidml code * Remove plaidML tests from unit tests * remove plaidml_utils and docsting cleanups * Remove plaidML refs from configs * fix keras imports
25 lines
834 B
Python
25 lines
834 B
Python
#!/usr/bin/env python3
|
|
""" Dynamically import the correct GPU Stats library based on the faceswap backend and the machine
|
|
being used. """
|
|
|
|
import platform
|
|
|
|
from lib.utils import get_backend
|
|
|
|
from ._base import set_exclude_devices, GPUInfo
|
|
|
|
backend = get_backend()
|
|
|
|
if backend == "nvidia" and platform.system().lower() == "darwin":
|
|
from .nvidia_apple import NvidiaAppleStats as GPUStats # type:ignore
|
|
elif backend == "nvidia":
|
|
from .nvidia import NvidiaStats as GPUStats # type:ignore
|
|
elif backend == "apple_silicon":
|
|
from .apple_silicon import AppleSiliconStats as GPUStats # type:ignore
|
|
elif backend == "directml":
|
|
from .directml import DirectML as GPUStats # type:ignore
|
|
elif backend == "rocm":
|
|
from .rocm import ROCm as GPUStats # type:ignore
|
|
else:
|
|
from .cpu import CPUStats as GPUStats # type:ignore
|