From ae8aa2ea7a6a1964db157f6e6e7b2841c583e28d Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 12 Feb 2023 13:32:50 -0600 Subject: [PATCH] apply lint --- api/onnx_web/hacks.py | 44 ++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/api/onnx_web/hacks.py b/api/onnx_web/hacks.py index 996f6186..acb93ed2 100644 --- a/api/onnx_web/hacks.py +++ b/api/onnx_web/hacks.py @@ -47,17 +47,39 @@ def unload(exclude): # these should be the same sources and names as `convert.base_models.sources`, but inverted so the source is the key cache_path_map = { - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth": "correction-codeformer.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/detection_Resnet50_Final.pth": "detection-resnet50-final.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/detection_mobilenet0.25_Final.pth": "detection-mobilenet025-final.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_bisenet.pth": "parsing-bisenet.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth": "parsing-parsenet.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/RealESRGAN_x2plus.pth": "upscaling-real-esrgan-x2-plus", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5l-face.pth": "detection-yolo-v5-l.pth", - "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5n-face.pth": "detection-yolo-v5-n.pth", - "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth": "correct-gfpgan-v1-3.pth", - "https://s3.eu-central-1.wasabisys.com/nextml-model-data/codeformer/weights/facelib/detection_Resnet50_Final.pth": "detection-resnet50-final.pth", - "https://s3.eu-central-1.wasabisys.com/nextml-model-data/codeformer/weights/facelib/parsing_parsenet.pth": "parsing-parsenet.pth", + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth": ( + "correction-codeformer.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/detection_Resnet50_Final.pth": ( + "detection-resnet50-final.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/detection_mobilenet0.25_Final.pth": ( + "detection-mobilenet025-final.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_bisenet.pth": ( + "parsing-bisenet.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth": ( + "parsing-parsenet.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/RealESRGAN_x2plus.pth": ( + "upscaling-real-esrgan-x2-plus" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5l-face.pth": ( + "detection-yolo-v5-l.pth" + ), + "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5n-face.pth": ( + "detection-yolo-v5-n.pth" + ), + "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth": ( + "correct-gfpgan-v1-3.pth" + ), + "https://s3.eu-central-1.wasabisys.com/nextml-model-data/codeformer/weights/facelib/detection_Resnet50_Final.pth": ( + "detection-resnet50-final.pth" + ), + "https://s3.eu-central-1.wasabisys.com/nextml-model-data/codeformer/weights/facelib/parsing_parsenet.pth": ( + "parsing-parsenet.pth" + ), }