This commit is contained in:
geewiz94 2022-05-07 13:50:10 +02:00
parent eaf7b4c156
commit faef5a683e
3 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: faceswap2
name: faceswap
channels:
- conda-forge
- apple

View File

@ -163,7 +163,7 @@ class GPUStats():
loglevel = "INFO" if self._logger is None else self._logger.getEffectiveLevel()
self._plaid = plaidlib(log_level=loglevel, log=log)
elif IS_MACOS:
self._log("debug", "macOS Detected.")
self._log("debug", "macOS Detected. Using Metal")
try:
metal.init()
except RuntimeError:
@ -314,7 +314,9 @@ class GPUStats():
elif self._is_plaidml:
vram = self._plaid.vram
elif IS_MACOS:
vram = [metal.get_memory_info(i) / (1024 * 1024) for i in range(self._device_count)]
vram = [metal.get_memory_info(i) /
(1024 * 1024)
for i in range(self._device_count)]
else:
vram = [pynvml.nvmlDeviceGetMemoryInfo(handle).total /
(1024 * 1024)
@ -342,7 +344,9 @@ class GPUStats():
if self._is_plaidml:
vram = self._plaid.vram
elif IS_MACOS:
vram = [metal.get_memory_info(i) / (1024 * 1024) for i in range(self._device_count)]
vram = [metal.get_memory_info(i) /
(1024 * 1024)
for i in range(self._device_count)]
else:
vram = [pynvml.nvmlDeviceGetMemoryInfo(handle).free / (1024 * 1024)
for handle in self._handles]

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python3
""" Normalization methods for faceswap.py common to both Plaid and Tensorflow Backends """
from ast import Import
import sys
import inspect