Merge branch 'invoke-ai:development' into development

This commit is contained in:
Any-Winter-4079 2022-09-24 22:01:00 +02:00 committed by GitHub
commit c78c39e676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -742,7 +742,8 @@ class Generate:
if self.codeformer is None: if self.codeformer is None:
print('>> CodeFormer not found. Face restoration is disabled.') print('>> CodeFormer not found. Face restoration is disabled.')
else: else:
image = self.codeformer.process(image=image, strength=strength, device=self.device, seed=seed, fidelity=codeformer_fidelity) cf_device = 'cpu' if str(self.device) == 'mps' else self.device
image = self.codeformer.process(image=image, strength=strength, device=cf_device, seed=seed, fidelity=codeformer_fidelity)
else: else:
print(">> Face Restoration is disabled.") print(">> Face Restoration is disabled.")
except Exception as e: except Exception as e: