Gourieff / ReActor-UI

Fast and Simple Face Swap
GNU Affero General Public License v3.0
196 stars 21 forks source link

C:\Users\User_Name/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 #12

Open DarksealStudios opened 7 months ago

DarksealStudios commented 7 months ago

I am seeing this C:\Users\Darkseal/.insightface\models\buffalo_l\w600k_r50.onnx when looking for all of the buffalo_l files. Is there a way to edit this path in the program so that it looks inside the venv? I don't see a config files in the ReActor-UI, and would like to keep the venv contained.

halp!

Gourieff commented 7 months ago

It will be fixed in future updates (can't say exactly this year or after NY holidays) You can set this path manually by editing this line and adding root parameter (with path to the directory where you want to store the models\buffalo_l folder): https://github.com/Gourieff/ReActor-UI/blob/main/modules/face_analyser.py#L14

 FACE_ANALYSER = insightface.app.FaceAnalysis(name='buffalo_l', providers=modules.globals.execution_providers, root='C:\ReActor-UI\models\analyzer')

With this example the real path to buffalo models should be: C:\ReActor-UI\models\analyzer\models\buffalo_l

DarksealStudios commented 7 months ago

Thank you so much! But, when I edited it to my root path I get an error: OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'F:\Ai\ReActor Main\ReActor-UI-main\x0benv'

full error: libpng warning: iCCP: known incorrect sRGB profile download_path: F:\Ai\ReActor Main\ReActor-UI-main♂env.insightface\modeluffalo_l\models\buffalo_l Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Darkseal\AppData\Local\Programs\Python\Python310\lib\tkinter__init.py", line 1921, in call return self.func(*args) File "F:\Ai\ReActor Main\ReActor-UI-main\venv\lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 553, in _clicked self._command() File "F:\Ai\ReActor Main\ReActor-UI-main\modules\ui.py", line 95, in start_button = ctk.CTkButton(root, text='Start', cursor='hand2', command=lambda: select_output_path(start)) File "F:\Ai\ReActor Main\ReActor-UI-main\modules\ui.py", line 189, in select_output_path start() File "F:\Ai\ReActor Main\ReActor-UI-main\modules\core.py", line 171, in start if not frame_processor.pre_start(): File "F:\Ai\ReActor Main\ReActor-UI-main\modules\processors\frame\face_swapper.py", line 28, in pre_start elif not get_one_face(cv2.imread(modules.globals.source_path)): File "F:\Ai\ReActor Main\ReActor-UI-main\modules\face_analyser.py", line 20, in get_one_face face = get_face_analyser().get(frame) File "F:\Ai\ReActor Main\ReActor-UI-main\modules\face_analyser.py", line 14, in get_face_analyser FACE_ANALYSER = insightface.app.FaceAnalysis(name='buffalo_l', providers=modules.globals.execution_providers, root='F:\Ai\ReActor Main\ReActor-UI-main\venv.insightface\models\buffalo_l') File "F:\Ai\ReActor Main\ReActor-UI-main\venv\lib\site-packages\insightface\app\face_analysis.py", line 27, in init__ self.model_dir = ensure_available('models', name, root=root) File "F:\Ai\ReActor Main\ReActor-UI-main\venv\lib\site-packages\insightface\utils\storage.py", line 28, in ensure_available return download(sub_dir, name, force=False, root=root) File "F:\Ai\ReActor Main\ReActor-UI-main\venv\lib\site-packages\insightface\utils\storage.py", line 17, in download download_file(model_url, File "F:\Ai\ReActor Main\ReActor-UI-main\venv\lib\site-packages\insightface\utils\download.py", line 68, in download_file os.makedirs(dirname) File "C:\Users\Darkseal\AppData\Local\Programs\Python\Python310\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\Darkseal\AppData\Local\Programs\Python\Python310\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\Darkseal\AppData\Local\Programs\Python\Python310\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\Darkseal\AppData\Local\Programs\Python\Python310\lib\os.py", line 225, in makedirs mkdir(name, mode) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'F:\Ai\ReActor Main\ReActor-UI-main\x0benv'

Gourieff commented 7 months ago

But, when I edited it to my root path I get an error: OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'F:\Ai\ReActor Main\ReActor-UI-main\x0benv' full error: libpng warning: iCCP: known incorrect sRGB profile download_path: F:\Ai\ReActor Main\ReActor-UI-main♂env.insightface\modeluffalo_l\models\buffalo_l

Because the part of your path "\x0b" is recognized as special symbol ♂ Try Unix path syntax instead 'F:/Ai/ReActor Main/ReActor-UI-main/x0benv/'

DarksealStudios commented 7 months ago

but what I changed was the location where to look for buffalo_l, so I tried "F:/Ai/ReActor Main/ReActor-UI-main/venv/.insightface/models/buffalo_l", but an error comes up so fast I cannot read it. I don't know where x0benv is, I can't find one, and don't see reference to it in the face_analyser.py I might just have to wait for that update. I need to learn more.