Next 1.3.1 (#149)

* Use default flags for installer

* Remove condition for cpu

* Okay, here we have default torch

* Update preview

* Fix CI
This commit is contained in:
Henry Ruhs 2023-10-10 13:18:03 +02:00 committed by GitHub
parent 5591b03a88
commit ea8ecf7db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

BIN
.github/preview.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -30,6 +30,6 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- run: python install.py --torch cpu --onnxruntime cpu
- run: python install.py --torch cpu --onnxruntime default
- run: pip install pytest
- run: pytest

View File

@ -10,13 +10,14 @@ from facefusion import metadata, wording
TORCH : Dict[str, str] =\
{
'cpu': 'https://download.pytorch.org/whl/cpu',
'cuda': 'https://download.pytorch.org/whl/cu118',
'rocm': 'https://download.pytorch.org/whl/rocm5.6'
'default': 'default',
'cpu': 'cpu',
'cuda': 'cu118',
'rocm': 'rocm5.6'
}
ONNXRUNTIMES : Dict[str, Tuple[str, str]] =\
{
'cpu': ('onnxruntime', '1.16.0 '),
'default': ('onnxruntime', '1.16.0'),
'cuda': ('onnxruntime-gpu', '1.16.0'),
'coreml-legacy': ('onnxruntime-coreml', '1.13.1'),
'coreml-silicon': ('onnxruntime-silicon', '1.16.0'),
@ -58,11 +59,13 @@ def run(program : ArgumentParser) -> None:
])
if answers is not None:
torch = answers['torch']
torch_url = TORCH[torch]
torch_wheel = TORCH[torch]
onnxruntime = answers['onnxruntime']
onnxruntime_name, onnxruntime_version = ONNXRUNTIMES[onnxruntime]
subprocess.call([ 'pip', 'uninstall', 'torch', '-y' ])
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt', '--extra-index-url', torch_url ])
if onnxruntime != 'cpu':
subprocess.call([ 'pip', 'uninstall', 'onnxruntime', onnxruntime_name, '-y' ])
if torch_wheel == 'default':
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt' ])
else:
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt', '--extra-index-url', 'https://download.pytorch.org/whl/' + torch_wheel ])
subprocess.call([ 'pip', 'uninstall', 'onnxruntime', onnxruntime_name, '-y' ])
subprocess.call([ 'pip', 'install', onnxruntime_name + '==' + onnxruntime_version ])

View File

@ -2,7 +2,7 @@ METADATA =\
{
'name': 'FaceFusion',
'description': 'Next generation face swapper and enhancer',
'version': '1.3.0',
'version': '1.3.1',
'license': 'MIT',
'author': 'Henry Ruhs',
'url': 'https://facefusion.io'