Spaces:
Running
Running
update.
Browse filesFiles changed (2)
210 unmodified lines211212213214215216217210 unmodified lines del output_img_t torch.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 lines110111112113114115116113114115116117118119109 unmodified lines draw_box = False detection_model = "retinaface_resnet50" print('Inp:', image, background_enhance, face_upsample, upscale, codeformer_fidelity) if background_enhance is None: background_enhance = True if face_upsample is None: face_upsample = True if upscale is None: upscale = 2
background_enhance = background_enhance if background_enhance is not None else True face_upsample = face_upsample if face_upsample is not None else True upscale = upscale if (upscale is not None and upscale > 0) else 2
img = cv2.imread(str(image), cv2.IMREAD_COLOR) print('\timage size:', img.shape)CodeFormer/basicsr/utils/realesrgan_utils.py+1
app.py+4-4