From 3daf9cac4617fa3107440ff5de80e1d9b4c906ab Mon Sep 17 00:00:00 2001 From: Elias Oenal Date: Wed, 14 Sep 2022 14:06:01 +0200 Subject: [PATCH] Removed stray references to shared.device_codeformer. --- modules/codeformer_model.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index 336f007d6..8fbdea249 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -47,13 +47,11 @@ def setup_codeformer(): def __init__(self): self.net = None self.face_helper = None - if shared.device.type == 'mps': # CodeFormer currently does not support mps backend - shared.device_codeformer = torch.device('cpu') def create_models(self): if self.net is not None and self.face_helper is not None: - self.net.to(shared.device_codeformer) + self.net.to(devices.device_codeformer) return self.net, self.face_helper net = net_class(dim_embd=512, codebook_size=1024, n_head=8, n_layers=9, connect_list=['32', '64', '128', '256']).to(devices.device_codeformer) @@ -66,7 +64,7 @@ def setup_codeformer(): self.net = net self.face_helper = face_helper - self.net.to(shared.device_codeformer) + self.net.to(devices.device_codeformer) return net, face_helper