Lipsing / enhance.py
ibrahim313's picture
Upload 12 files
24bde82 verified
raw
history blame contribute delete
491 Bytes
import warnings
from gfpgan import GFPGANer
warnings.filterwarnings("ignore")
def load_sr():
run_params = GFPGANer(
model_path="checkpoints/GFPGANv1.4.pth",
upscale=1,
arch="clean",
channel_multiplier=2,
bg_upsampler=None,
)
return run_params
def upscale(image, properties):
_, _, output = properties.enhance(
image, has_aligned=False, only_center_face=False, paste_back=True
)
return output