mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
Cleanup
This commit is contained in:
parent
eaf7b4c156
commit
faef5a683e
|
|
@ -1,4 +1,4 @@
|
|||
name: faceswap2
|
||||
name: faceswap
|
||||
channels:
|
||||
- conda-forge
|
||||
- apple
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user