mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix CodeFormer not working if GFPGAN is enabeld
This commit is contained in:
parent
0678b24ebb
commit
b1d1063a25
@ -727,16 +727,16 @@ class Generate:
|
|||||||
print(">> ESRGAN is disabled. Image not upscaled.")
|
print(">> ESRGAN is disabled. Image not upscaled.")
|
||||||
if strength > 0:
|
if strength > 0:
|
||||||
if self.gfpgan is not None or self.codeformer is not None:
|
if self.gfpgan is not None or self.codeformer is not None:
|
||||||
if self.gfpgan is None:
|
if facetool == 'gfpgan':
|
||||||
if facetool == 'codeformer':
|
if self.gfpgan is None:
|
||||||
if self.codeformer is not None:
|
|
||||||
image = self.codeformer.process(image=image, strength=strength, device=self.device, seed=seed, fidelity=codeformer_fidelity)
|
|
||||||
else:
|
|
||||||
print('>> CodeFormer not found. Face restoration is disabled.')
|
|
||||||
else:
|
|
||||||
print('>> GFPGAN not found. Face restoration is disabled.')
|
print('>> GFPGAN not found. Face restoration is disabled.')
|
||||||
else:
|
else:
|
||||||
image = self.gfpgan.process(image, strength, seed)
|
image = self.gfpgan.process(image, strength, seed)
|
||||||
|
if facetool == 'codeformer':
|
||||||
|
if self.codeformer is None:
|
||||||
|
print('>> CodeFormer not found. Face restoration is disabled.')
|
||||||
|
else:
|
||||||
|
image = self.codeformer.process(image=image, strength=strength, device=self.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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user