When device is MPS, use CPU for GFPGAN instead

GFPGAN will not work if the device is MPS, so default to CPU instead.
This commit is contained in:
brkirch
2022-09-30 23:53:25 -04:00
parent 84e97a98c5
commit bdaa36c844
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ errors.run(enable_tf32, "Enabling TF32")
device = get_optimal_device()
device_codeformer = cpu if has_mps else device
device_gfpgan = device_codeformer = cpu if device.type == 'mps' else device
def randn(seed, shape):