Delete NeuroDonu/PortableSource(for portables)
Browse files- NeuroDonu/PortableSource(for portables)/7z.exe +0 -3
- NeuroDonu/PortableSource(for portables)/CUDA_118.7z +0 -3
- NeuroDonu/PortableSource(for portables)/CUDA_124.7z +0 -3
- NeuroDonu/PortableSource(for portables)/CUDA_128.7z +0 -3
- NeuroDonu/PortableSource(for portables)/VisualStudioSetup.exe +0 -3
- NeuroDonu/PortableSource(for portables)/aria2c.exe +0 -3
- NeuroDonu/PortableSource(for portables)/cudnn-linux-x86_64-8.9.7.29_cuda11-archive.7z +0 -3
- NeuroDonu/PortableSource(for portables)/cudnn-linux-x86_64-8.9.7.29_cuda11-archive.tar.xz +0 -3
- NeuroDonu/PortableSource(for portables)/cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb +0 -3
- NeuroDonu/PortableSource(for portables)/ffmpeg.7z +0 -3
- NeuroDonu/PortableSource(for portables)/git.7z +0 -3
- NeuroDonu/PortableSource(for portables)/onnxruntime_providers-DLL's.7z +0 -3
- NeuroDonu/PortableSource(for portables)/onnxruntime_providers_cuda.dll +0 -3
- NeuroDonu/PortableSource(for portables)/onnxruntime_providers_shared.dll +0 -0
- NeuroDonu/PortableSource(for portables)/onnxruntime_providers_tensorrt.dll +0 -3
- NeuroDonu/PortableSource(for portables)/python.7z +0 -3
- NeuroDonu/PortableSource(for portables)/python311.7z +0 -3
- NeuroDonu/PortableSource(for portables)/sageattention-2.1.1-cp310-cp310-win_amd64.whl +0 -3
- NeuroDonu/PortableSource(for portables)/sageattention-2.1.1-cp311-cp311-win_amd64.whl +0 -3
- NeuroDonu/PortableSource(for portables)/updater.py +0 -120
- NeuroDonu/PortableSource(for portables)/updater_facefusion.py +0 -135
NeuroDonu/PortableSource(for portables)/7z.exe
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1b16c41ae39b679384b06f1492b587b650716430ff9c2e079dca2ad1f62c952d
|
| 3 |
-
size 591360
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/CUDA_118.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:da776256b2238b20f680d4e4b2533e4020c620eda18508da78c3e4580e340add
|
| 3 |
-
size 1620417125
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/CUDA_124.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:3b5d61bd9d04deee458a827fbcd15ed3296638c42d80c0491ce7fd0ba6805348
|
| 3 |
-
size 2141326433
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/CUDA_128.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7b484cfd7f143e7638bae8b2b7c1ac7cc9afe052e47e84bffa8c392ee8b51b44
|
| 3 |
-
size 2642305670
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/VisualStudioSetup.exe
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:60d086b80f3e99fc5da77070060523bce68e4051304fded57ebbd531e7ddf791
|
| 3 |
-
size 4454360
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/aria2c.exe
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:be2099c214f63a3cb4954b09a0becd6e2e34660b886d4c898d260febfe9d70c2
|
| 3 |
-
size 5649408
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/cudnn-linux-x86_64-8.9.7.29_cuda11-archive.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f7690cfdbfd1245e65414f01dc03049bab206b5a808dcbe6840c6048f7719bd4
|
| 3 |
-
size 1580208982
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/cudnn-linux-x86_64-8.9.7.29_cuda11-archive.tar.xz
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a3e2509028cecda0117ce5a0f42106346e82e86d390f4bb9475afc976c77402e
|
| 3 |
-
size 860967256
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:72875964d76c4dc27ceb3be11c5b3e6568515e91d48459e18c76532f087b8b9d
|
| 3 |
-
size 879356122
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/ffmpeg.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:fa3b4b0e24cf3cf3c8e8bd7293d1f86f8e39bc693256a87ecb8e08ce8de41ce5
|
| 3 |
-
size 96474654
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/git.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:72889f719465d46a48abd54233157ee293e3c39d82d1554e9e31caf66d9d2126
|
| 3 |
-
size 55860576
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/onnxruntime_providers-DLL's.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:67a7f7717e16709cd8f78e47873349de0c5c720fa0e51f82b2cb9d0bf1680980
|
| 3 |
-
size 33560271
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/onnxruntime_providers_cuda.dll
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ac5c4000c62489fad6809c02c7fa2d8f4432cea9a63809e23f8ecddbdd24180c
|
| 3 |
-
size 474678768
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/onnxruntime_providers_shared.dll
DELETED
|
Binary file (21 kB)
|
|
|
NeuroDonu/PortableSource(for portables)/onnxruntime_providers_tensorrt.dll
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d64b3e7d666c80677102d87102368c943a29caf9bbc7c4b07bdd735135ae93d5
|
| 3 |
-
size 750048
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/python.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:26ced3f3fe1114b277f5e3fa423a5dc01e1bfc7131cb7faedf60d37d8ac6a678
|
| 3 |
-
size 18595988
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/python311.7z
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1a07c206f52bfc04f7181ffb44e4936547484d52bb9cd9d937790949b7a7d2f8
|
| 3 |
-
size 17760630
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/sageattention-2.1.1-cp310-cp310-win_amd64.whl
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:2741025fddbab993508c54e3e7fa7fc903453595a3e1f2dde6c1f0c4ab3c407f
|
| 3 |
-
size 48396419
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/sageattention-2.1.1-cp311-cp311-win_amd64.whl
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9f84e0aa290554a8a6ec24b0b411edf889c7f262373195ee5240986c960a1f46
|
| 3 |
-
size 48400952
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/updater.py
DELETED
|
@@ -1,120 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import subprocess
|
| 3 |
-
import locale
|
| 4 |
-
import winreg
|
| 5 |
-
import argparse
|
| 6 |
-
|
| 7 |
-
abs_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 8 |
-
git = os.path.join(abs_path, "s", "git", "cmd", "git.exe")
|
| 9 |
-
master_path = os.path.join(abs_path, "p")
|
| 10 |
-
python = os.path.join(abs_path, "s", "python", "python.exe")
|
| 11 |
-
parser = argparse.ArgumentParser()
|
| 12 |
-
|
| 13 |
-
parser.add_argument('-wf', '--webcam-false', action='store_true')
|
| 14 |
-
parser.add_argument('-wt', '--webcam-true', action='store_true')
|
| 15 |
-
parser.add_argument('-mb', '--master-branch', action='store_true')
|
| 16 |
-
parser.add_argument('-nb', '--next-branch', action='store_true')
|
| 17 |
-
parser.add_argument('-nu', '--no-update', action='store_true')
|
| 18 |
-
|
| 19 |
-
args = parser.parse_args()
|
| 20 |
-
|
| 21 |
-
def run_git_command(args):
|
| 22 |
-
subprocess.run([git] + args, check=True)
|
| 23 |
-
|
| 24 |
-
def prepare_environment(branch):
|
| 25 |
-
branch_path = os.path.join(master_path, branch)
|
| 26 |
-
os.chdir(branch_path)
|
| 27 |
-
if not args.no_update:
|
| 28 |
-
run_git_command(['reset', '--hard'])
|
| 29 |
-
run_git_command(['checkout', branch])
|
| 30 |
-
run_git_command(['pull', 'origin', branch, '--rebase'])
|
| 31 |
-
|
| 32 |
-
def ask_webcam_mode(language):
|
| 33 |
-
"""Спрашивает у пользователя режим вебкамеры и возвращает определенный результат"""
|
| 34 |
-
webcam_choice = input(get_localized_text(language, "enable_webcam")).strip().lower()
|
| 35 |
-
if webcam_choice in ["y", "д"]:
|
| 36 |
-
return True
|
| 37 |
-
elif webcam_choice in ["n", "н"]:
|
| 38 |
-
return False
|
| 39 |
-
else:
|
| 40 |
-
print("Неверный ввод, вебкамера отключена по умолчанию.")
|
| 41 |
-
return False
|
| 42 |
-
|
| 43 |
-
def start_ff(branch, webcam_mode=False):
|
| 44 |
-
path_to_branch = os.path.join(master_path, branch)
|
| 45 |
-
second_file = os.path.join(path_to_branch, "facefusion.py")
|
| 46 |
-
args = ["run", "--open-browser", "--ui-layouts", "webcam"] if webcam_mode else ["run", "--open-browser"]
|
| 47 |
-
cmd = f'"{python}" "{second_file}" {" ".join(args)}'
|
| 48 |
-
subprocess.run(cmd, shell=True, check=True)
|
| 49 |
-
|
| 50 |
-
def get_localized_text(language, key):
|
| 51 |
-
texts = {
|
| 52 |
-
"en": {
|
| 53 |
-
"choose_action": "Choose an action:",
|
| 54 |
-
"update_master": "1. Update to the master branch and start it",
|
| 55 |
-
"update_next": "2. Update to the next branch and start it",
|
| 56 |
-
"enter_choice": "Enter the number of the action: ",
|
| 57 |
-
"invalid_choice": "Invalid choice, please try again.",
|
| 58 |
-
"enable_webcam": "Enable webcam mode? (Y/N): ",
|
| 59 |
-
},
|
| 60 |
-
"ru": {
|
| 61 |
-
"choose_action": "Выберите действие:",
|
| 62 |
-
"update_master": "1. Обновить до обычной ветки и запустить ее (master)",
|
| 63 |
-
"update_next": "2. Обновить до бета ветки и запустить ее (next)",
|
| 64 |
-
"enter_choice": "Введите номер действия: ",
|
| 65 |
-
"invalid_choice": "Неверный выбор, попробуйте снова.",
|
| 66 |
-
"enable_webcam": "Включить режим вебкамеры? (Y/N): ",
|
| 67 |
-
}
|
| 68 |
-
}
|
| 69 |
-
return texts[language].get(key, "")
|
| 70 |
-
|
| 71 |
-
def get_system_language():
|
| 72 |
-
"""Определяет системный язык с корректной обработкой None значений"""
|
| 73 |
-
try:
|
| 74 |
-
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Control Panel\International")
|
| 75 |
-
language = winreg.QueryValueEx(key, "LocaleName")[0]
|
| 76 |
-
winreg.CloseKey(key)
|
| 77 |
-
if language:
|
| 78 |
-
return "ru" if language.split('-')[0].lower() == "ru" else "en"
|
| 79 |
-
except (WindowsError, AttributeError):
|
| 80 |
-
pass
|
| 81 |
-
|
| 82 |
-
try:
|
| 83 |
-
locale_info = locale.getlocale()[0]
|
| 84 |
-
if locale_info:
|
| 85 |
-
return "ru" if locale_info.split('_')[0].lower() == "ru" else "en"
|
| 86 |
-
except (AttributeError, IndexError):
|
| 87 |
-
pass
|
| 88 |
-
|
| 89 |
-
return "ru"
|
| 90 |
-
|
| 91 |
-
def facefusion():
|
| 92 |
-
language = get_system_language()
|
| 93 |
-
if args.master_branch or args.next_branch:
|
| 94 |
-
branch = "master" if args.master_branch else "next"
|
| 95 |
-
prepare_environment(branch)
|
| 96 |
-
if args.webcam_true:
|
| 97 |
-
webcam_mode = True
|
| 98 |
-
elif args.webcam_false:
|
| 99 |
-
webcam_mode = False
|
| 100 |
-
else:
|
| 101 |
-
webcam_mode = ask_webcam_mode(language)
|
| 102 |
-
start_ff(branch, webcam_mode)
|
| 103 |
-
return
|
| 104 |
-
|
| 105 |
-
while True:
|
| 106 |
-
print(get_localized_text(language, "choose_action"))
|
| 107 |
-
print(get_localized_text(language, "update_master"))
|
| 108 |
-
print(get_localized_text(language, "update_next"))
|
| 109 |
-
choice = input(get_localized_text(language, "enter_choice")).strip()
|
| 110 |
-
if choice in ['1', '2']:
|
| 111 |
-
branch = "master" if choice == '1' else "next"
|
| 112 |
-
prepare_environment(branch)
|
| 113 |
-
webcam_mode = ask_webcam_mode(language)
|
| 114 |
-
start_ff(branch, webcam_mode)
|
| 115 |
-
break
|
| 116 |
-
else:
|
| 117 |
-
print(get_localized_text(language, "invalid_choice"))
|
| 118 |
-
|
| 119 |
-
if __name__ == "__main__":
|
| 120 |
-
facefusion()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeuroDonu/PortableSource(for portables)/updater_facefusion.py
DELETED
|
@@ -1,135 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import subprocess
|
| 3 |
-
import sys
|
| 4 |
-
import locale
|
| 5 |
-
import winreg
|
| 6 |
-
|
| 7 |
-
def get_available_drives():
|
| 8 |
-
drives = []
|
| 9 |
-
for drive in range(65, 91): # ASCII коды от A (65) до Z (90)
|
| 10 |
-
drive_letter = f"{chr(drive)}:\\"
|
| 11 |
-
if os.path.exists(drive_letter):
|
| 12 |
-
drives.append(drive_letter)
|
| 13 |
-
return drives
|
| 14 |
-
|
| 15 |
-
def get_path_for_install():
|
| 16 |
-
language = get_system_language()
|
| 17 |
-
if not language:
|
| 18 |
-
language = input(get_localized_text("en", "choose_language")).strip().lower()
|
| 19 |
-
if language not in ["en", "ru"]:
|
| 20 |
-
language = "en"
|
| 21 |
-
|
| 22 |
-
default_path = "C:\\"
|
| 23 |
-
user_input = input(get_localized_text(language, "which_path") + f" ({default_path}): ").strip()
|
| 24 |
-
|
| 25 |
-
install_path = user_input if user_input else default_path
|
| 26 |
-
|
| 27 |
-
full_path = os.path.join(install_path, 'portablesource')
|
| 28 |
-
if not os.path.exists(full_path):
|
| 29 |
-
try:
|
| 30 |
-
os.makedirs(full_path)
|
| 31 |
-
except OSError:
|
| 32 |
-
print(get_localized_text(language, "error_creating_directory"))
|
| 33 |
-
return get_path_for_install()
|
| 34 |
-
|
| 35 |
-
with open(os.path.join(full_path, 'installed.txt'), 'w') as f:
|
| 36 |
-
f.write('installed')
|
| 37 |
-
|
| 38 |
-
return full_path
|
| 39 |
-
|
| 40 |
-
def get_install_path():
|
| 41 |
-
drives = get_available_drives()
|
| 42 |
-
install_path = None
|
| 43 |
-
for drive in drives:
|
| 44 |
-
possible_path = os.path.join(drive, 'portablesource', 'installed.txt')
|
| 45 |
-
if os.path.exists(possible_path):
|
| 46 |
-
install_path = os.path.dirname(possible_path)
|
| 47 |
-
return install_path
|
| 48 |
-
else:
|
| 49 |
-
install_path = get_path_for_install()
|
| 50 |
-
return install_path
|
| 51 |
-
return install_path
|
| 52 |
-
|
| 53 |
-
abs_path = get_install_path()
|
| 54 |
-
git = os.path.join(abs_path, "system", "git", "cmd", "git.exe")
|
| 55 |
-
ff_obs = os.path.join(abs_path, "sources", "facefusion")
|
| 56 |
-
master_path = os.path.join(ff_obs, "master")
|
| 57 |
-
python = os.path.join(abs_path, "sources", "facefusion", "venv", "Scripts", "python.exe")
|
| 58 |
-
|
| 59 |
-
def run_git_command(args):
|
| 60 |
-
subprocess.run([git] + args, check=True)
|
| 61 |
-
|
| 62 |
-
def update_branch(branch):
|
| 63 |
-
os.chdir(master_path)
|
| 64 |
-
run_git_command(['reset', '--hard'])
|
| 65 |
-
run_git_command(['checkout', 'master'])
|
| 66 |
-
run_git_command(['pull', 'origin', 'master', '--rebase'])
|
| 67 |
-
|
| 68 |
-
def start_ff(branch, webcam_mode=False):
|
| 69 |
-
path_to_branch = master_path
|
| 70 |
-
second_file = os.path.join(path_to_branch, "facefusion.py")
|
| 71 |
-
|
| 72 |
-
if webcam_mode:
|
| 73 |
-
args = ["run", "--open-browser", "--ui-layouts", "webcam"]
|
| 74 |
-
else:
|
| 75 |
-
args = ["run"]
|
| 76 |
-
|
| 77 |
-
cmd = f'"{python}" "{second_file}" {" ".join(args)}'
|
| 78 |
-
|
| 79 |
-
subprocess.run(cmd, shell=True, check=True)
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
def get_localized_text(language, key):
|
| 83 |
-
texts = {
|
| 84 |
-
"en": {
|
| 85 |
-
"choose_action": "Choose an action:",
|
| 86 |
-
"update_master": "1. Update to the master branch and start it",
|
| 87 |
-
"enter_choice": "Enter the number of the action: ",
|
| 88 |
-
"invalid_choice": "Invalid choice, please try again.",
|
| 89 |
-
"enable_webcam": "Enable webcam mode? (Y/N): ",
|
| 90 |
-
},
|
| 91 |
-
"ru": {
|
| 92 |
-
"choose_action": "Выберите действие:",
|
| 93 |
-
"update_master": "1. Обновить до обычной ветки и запустить ее (master)",
|
| 94 |
-
"enter_choice": "Введите номер действия: ",
|
| 95 |
-
"invalid_choice": "Неверный выбор, попробуйте снова.",
|
| 96 |
-
"enable_webcam": "Включить режим вебкамеры? (Y/N): ",
|
| 97 |
-
}
|
| 98 |
-
}
|
| 99 |
-
return texts[language].get(key, "")
|
| 100 |
-
|
| 101 |
-
def get_system_language():
|
| 102 |
-
try:
|
| 103 |
-
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Control Panel\International")
|
| 104 |
-
language = winreg.QueryValueEx(key, "LocaleName")[0]
|
| 105 |
-
winreg.CloseKey(key)
|
| 106 |
-
lang_code = language.split('-')[0].lower()
|
| 107 |
-
return "ru" if lang_code == "ru" else "en"
|
| 108 |
-
except WindowsError:
|
| 109 |
-
lang_code = locale.getdefaultlocale()[0].split('_')[0].lower()
|
| 110 |
-
return "ru" if lang_code == "ru" else "en"
|
| 111 |
-
|
| 112 |
-
def ask_webcam_mode(language):
|
| 113 |
-
webcam_choice = input(get_localized_text(language, "enable_webcam")).strip().lower()
|
| 114 |
-
return webcam_choice == 'y'
|
| 115 |
-
|
| 116 |
-
def facefusion():
|
| 117 |
-
language = get_system_language()
|
| 118 |
-
if not language:
|
| 119 |
-
language = input(get_localized_text("en", "choose_language")).strip().lower()
|
| 120 |
-
if language not in ["en", "ru"]:
|
| 121 |
-
language = "en"
|
| 122 |
-
while True:
|
| 123 |
-
print(get_localized_text(language, "choose_action"))
|
| 124 |
-
print(get_localized_text(language, "update_master"))
|
| 125 |
-
choice = input(get_localized_text(language, "enter_choice")).strip()
|
| 126 |
-
|
| 127 |
-
if choice == '1':
|
| 128 |
-
update_branch('master')
|
| 129 |
-
webcam_mode = ask_webcam_mode(language)
|
| 130 |
-
start_ff("master", webcam_mode)
|
| 131 |
-
else:
|
| 132 |
-
print(get_localized_text(language, "invalid_choice"))
|
| 133 |
-
|
| 134 |
-
if __name__ == "__main__":
|
| 135 |
-
facefusion()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|