diff --git a/ldm/simplet2i.py b/ldm/simplet2i.py index f0713081c8..1cc199c119 100644 --- a/ldm/simplet2i.py +++ b/ldm/simplet2i.py @@ -399,8 +399,8 @@ The vast majority of these arguments default to reasonable values. try: if gfpgan_strength > 0: image = self._run_gfpgan(image, gfpgan_strength) - except Exception: - print(f"Error running GFPGAN - Your image was not enhanced.") + except Exception as e: + print(f"Error running GFPGAN - Your image was not enhanced.\n{e}") images.append(image) return images diff --git a/scripts/dream.py b/scripts/dream.py index e2825f8142..4def627519 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -81,9 +81,7 @@ def main(): sys.path.append(os.path.abspath(opt.gfpgan_dir)) from gfpgan import GFPGANer - bg_upsampler = None - if opt.gfpgan_bg_upsampler == 'realesrgan': - bg_upsampler = load_gfpgan_bg_upsampler(opt.gfpgan_bg_upsampler, opt.gfpgan_bg_tile) + bg_upsampler = load_gfpgan_bg_upsampler(opt.gfpgan_bg_upsampler, opt.gfpgan_bg_tile) t2i.gfpgan = GFPGANer(model_path=model_path, upscale=opt.gfpgan_upscale, arch='clean', channel_multiplier=2, bg_upsampler=bg_upsampler) except Exception: