|
|
|
|
|
|
|
|
|
|
|
|
|
import sys
|
|
import os
|
|
import subprocess
|
|
import shutil
|
|
import argparse
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description="Setup third-party dependencies for anime super resolution")
|
|
parser.add_argument('--src_path', default=os.path.join('src', 'third_party'),
|
|
help='Path to append to sys.path and copy Real-ESRGAN to')
|
|
parser.add_argument('--repo_url', default='https://github.com/danhtran2mind/Real-ESRGAN.git',
|
|
help='URL of the Real-ESRGAN repository to clone')
|
|
parser.add_argument('--clone_dir', default='Real-ESRGAN', help='Directory to clone Real-ESRGAN into')
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
sys.path.append(args.src_path)
|
|
|
|
|
|
os.makedirs(args.src_path, exist_ok=True)
|
|
|
|
|
|
subprocess.run(['git', 'clone', args.repo_url,
|
|
os.path.join(args.src_path, args.clone_dir)], check=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main() |