Spaces:
Running
Running
update.
Browse filesFiles changed (2)
210 unmodified lines211212213214215216210 unmodified linesdel output_img_ttorch.cuda.empty_cache()except RuntimeError as error:print(f"Failed inference for RealESRGAN: {error}")# ------------------- process the alpha channel if necessary ------------------- #210 unmodified lines211212213214215216217210 unmodified linesdel output_img_ttorch.cuda.empty_cache()except RuntimeError as error:output_img = cv2.resize(output_img, (w_input * self.scale, h_input * self.scale), interpolation=cv2.INTER_LINEAR)print(f"Failed inference for RealESRGAN: {error}")# ------------------- process the alpha channel if necessary ------------------- #
109 unmodified lines110111112113114115116117118119109 unmodified linesdraw_box = Falsedetection_model = "retinaface_resnet50"print('Inp:', image, background_enhance, face_upsample, upscale, codeformer_fidelity)if background_enhance is None: background_enhance = Trueif face_upsample is None: face_upsample = Trueif upscale is None: upscale = 2img = cv2.imread(str(image), cv2.IMREAD_COLOR)print('\timage size:', img.shape)109 unmodified lines110111112113114115116117118119109 unmodified linesdraw_box = Falsedetection_model = "retinaface_resnet50"print('Inp:', image, background_enhance, face_upsample, upscale, codeformer_fidelity)background_enhance = background_enhance if background_enhance is not None else Trueface_upsample = face_upsample if face_upsample is not None else Trueupscale = upscale if (upscale is not None and upscale > 0) else 2img = cv2.imread(str(image), cv2.IMREAD_COLOR)print('\timage size:', img.shape)
CodeFormer/basicsr/utils/realesrgan_utils.py+1
app.py+4-4