Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DarksealStudios opened this issue Nov 26, 2023 · 4 comments

Comments

@DarksealStudios
Copy link

DarksealStudios commented Nov 26, 2023

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!

@DarksealStudios DarksealStudios changed the title C:\Users\Darkseal/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 C:\Users\User_Name/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 Nov 26, 2023
@Gourieff
Copy link
Owner

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
Copy link
Author

DarksealStudios commented Nov 30, 2023

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
Copy link
Owner

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
Copy link
Author

DarksealStudios commented Dec 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants