From 871c3840e56cae3b8008f148b42a297036a7df86 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Mon, 21 Aug 2023 14:35:32 +0200 Subject: [PATCH] Host assets on GitHub --- .github/workflows/ci.yml | 8 ++++---- .../processors/frame/modules/face_enhancer.py | 2 +- .../processors/frame/modules/face_swapper.py | 2 +- .../processors/frame/modules/frame_enhancer.py | 2 +- facefusion/uis/layouts/benchmark.py | 16 ++++++++-------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a88c200..15ce716 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,11 @@ jobs: with: python-version: '3.10' - run: pip install -r requirements-ci.txt - - run: curl --create-dirs --output .assets/examples/source.jpg https://huggingface.co/facefusion/examples/resolve/main/source.jpg - - run: curl --create-dirs --output .assets/examples/target-240p.mp4 https://huggingface.co/facefusion/examples/resolve/main/target-240p.mp4 - - run: python run.py --source .assets/examples/source.jpg --target .assets/examples/target-240p.mp4 --output .assets/examples --trim-frame-end 24 + - run: curl --create-dirs --output .assets/examples/source.jpg https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg + - run: curl --create-dirs --output .assets/examples/target-240p.mp4 https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4 + - run: python run.py --source .assets/examples/source.jpg --target .assets/examples/target-240p.mp4 --output .assets/examples --trim-frame-end 30 if: matrix.os != 'windows-latest' - - run: python run.py --source .assets\examples\source.jpg --target .assets\examples\target-240p.mp4 --output .assets\examples --trim-frame-end 24 + - run: python run.py --source .assets\examples\source.jpg --target .assets\examples\target-240p.mp4 --output .assets\examples --trim-frame-end 30 if: matrix.os == 'windows-latest' - run: ffprobe -show_format -show_streams .assets/examples/source-target-240p.mp4 if: matrix.os != 'windows-latest' diff --git a/facefusion/processors/frame/modules/face_enhancer.py b/facefusion/processors/frame/modules/face_enhancer.py index cdfb0a8..7c07612 100644 --- a/facefusion/processors/frame/modules/face_enhancer.py +++ b/facefusion/processors/frame/modules/face_enhancer.py @@ -39,7 +39,7 @@ def clear_frame_processor() -> None: def pre_check() -> bool: download_directory_path = resolve_relative_path('../.assets/models') - conditional_download(download_directory_path, ['https://huggingface.co/facefusion/models/resolve/main/GFPGANv1.4.pth']) + conditional_download(download_directory_path, ['https://github.com/facefusion/facefusion-assets/releases/download/models/GFPGANv1.4.pth']) return True diff --git a/facefusion/processors/frame/modules/face_swapper.py b/facefusion/processors/frame/modules/face_swapper.py index 338365c..003bebb 100644 --- a/facefusion/processors/frame/modules/face_swapper.py +++ b/facefusion/processors/frame/modules/face_swapper.py @@ -35,7 +35,7 @@ def clear_frame_processor() -> None: def pre_check() -> bool: download_directory_path = resolve_relative_path('../.assets/models') - conditional_download(download_directory_path, ['https://huggingface.co/facefusion/models/resolve/main/inswapper_128.onnx']) + conditional_download(download_directory_path, ['https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx']) return True diff --git a/facefusion/processors/frame/modules/frame_enhancer.py b/facefusion/processors/frame/modules/frame_enhancer.py index 6d19273..21f51ab 100644 --- a/facefusion/processors/frame/modules/frame_enhancer.py +++ b/facefusion/processors/frame/modules/frame_enhancer.py @@ -47,7 +47,7 @@ def clear_frame_processor() -> None: def pre_check() -> bool: download_directory_path = resolve_relative_path('../.assets/models') - conditional_download(download_directory_path, ['https://huggingface.co/facefusion/models/resolve/main/RealESRGAN_x4plus.pth']) + conditional_download(download_directory_path, ['https://github.com/facefusion/facefusion-assets/releases/download/models/RealESRGAN_x4plus.pth']) return True diff --git a/facefusion/uis/layouts/benchmark.py b/facefusion/uis/layouts/benchmark.py index 109d5e3..f7ddf37 100644 --- a/facefusion/uis/layouts/benchmark.py +++ b/facefusion/uis/layouts/benchmark.py @@ -7,14 +7,14 @@ from facefusion.utilities import conditional_download def pre_check() -> bool: conditional_download('.assets/examples', [ - 'https://huggingface.co/facefusion/examples/resolve/main/source.jpg', - 'https://huggingface.co/facefusion/examples/resolve/main/target-240p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-360p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-540p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-720p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-1080p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-1440p.mp4', - 'https://huggingface.co/facefusion/examples/resolve/main/target-2160p.mp4' + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/source.jpg', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-360p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-540p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-720p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1080p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-1440p.mp4', + 'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-2160p.mp4' ]) return True