Comments (42)
INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Traceback (most recent call last): File "dot\__main__.py", line 69, in run File "dot\dot.py", line 131, in generate File "dot\commons\model_option.py", line 184, in generate_from_camera File "dot\simswap\option.py", line 83, in create_model File "dot\simswap\parsing_model\model.py", line 198, in __init__ File "dot\simswap\parsing_model\model.py", line 99, in __init__ File "dot\simswap\parsing_model\resnet.py", line 66, in __init__ File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight File "torch\hub.py", line 741, in load_state_dict_from_url sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file)) OSError: [WinError 6] The handle is invalid Traceback (most recent call last): File "dot\__main__.py", line 69, in run File "dot\dot.py", line 131, in generate File "dot\commons\model_option.py", line 184, in generate_from_camera File "dot\simswap\option.py", line 83, in create_model File "dot\simswap\parsing_model\model.py", line 198, in __init__ File "dot\simswap\parsing_model\model.py", line 99, in __init__ File "dot\simswap\parsing_model\resnet.py", line 66, in __init__ File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight File "torch\hub.py", line 741, in load_state_dict_from_url sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file)) OSError: [WinError 6] The handle is invalid
Error remains the same, using simswap, and simswap config file
2nd Error when I attempt to manually set the model_path into the resnet18-5c106cde.pthI removed the usage of
load_state_dict_from_url
as it appears to cause this error. The new executable is here. Let me know if the error still there.
Issue resolved !
from dot.
@Em1tSanМожете ли вы помочь нам с тестированием? :) эту проблему трудно воспроизвести
no problem, what do you need me to do?
We made few updates like removing cupy
. I will generate a new executable that you can test
from dot.
@bmleeBigby I generated an executable that can be used to trace the error. Try to download it from here and run it. It should print the error message. Once you get it, paste it in this issue. If you want to use the CLI, this PR #137 added the tracing to it.
Pardon the delay during holiday
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
File "dot\__main__.py", line 69, in run
File "dot\dot.py", line 131, in generate
File "dot\commons\model_option.py", line 184, in generate_from_camera
File "dot\simswap\option.py", line 83, in create_model
File "dot\simswap\parsing_model\model.py", line 198, in __init__
File "dot\simswap\parsing_model\model.py", line 99, in __init__
File "dot\simswap\parsing_model\resnet.py", line 66, in __init__
File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight
File "torch\hub.py", line 741, in load_state_dict_from_url
sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file))
OSError: [WinError 6] The handle is invalid
from dot.
@bmleeBigby I generated an executable that can be used to trace the error. Try to download it from here and run it. It should print the error message. Once you get it, paste it in this issue. If you want to use the CLI, this PR #137 added the tracing to it.
Pardon the delay during holiday
INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Traceback (most recent call last): File "dot\__main__.py", line 69, in run File "dot\dot.py", line 131, in generate File "dot\commons\model_option.py", line 184, in generate_from_camera File "dot\simswap\option.py", line 83, in create_model File "dot\simswap\parsing_model\model.py", line 198, in __init__ File "dot\simswap\parsing_model\model.py", line 99, in __init__ File "dot\simswap\parsing_model\resnet.py", line 66, in __init__ File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight File "torch\hub.py", line 741, in load_state_dict_from_url sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file)) OSError: [WinError 6] The handle is invalid
It seems that it's not able to download the resnet model. I generated another executable after I downloaded that model and put it in saved_models/simswap
with other changes. Can you test this new version. It's available here
from dot.
What OS system you are using and what's the error message in the command prompt?
from dot.
I m using windows 11 and "Winerror 6, the handle is invalid" is the error message in the command prompt.
from dot.
I m using windows 11 and "Winerror 6, the handle is invalid" is the error message in the command prompt.
Can you send me the full logs in the command prompt not only the error.
from dot.
It's certainly great that you removed the duplicates, but, what about a solution to this problem?
from dot.
@Em1tSan can you help us with some testing? :) this issue is hard to reproduce
from dot.
@Em1tSanМожете ли вы помочь нам с тестированием? :) эту проблему трудно воспроизвести
no problem, what do you need me to do?
from dot.
Did you guys publish the new Windows executable somewhere? I am having the exact same issue.
Lenovo Legion 5 with AMD Ryzen 7 5800h and NVIDIA RTX 3060, 16GB of RAM
Windows 11 Home
Python 3.11
from dot.
any fix for this yet i have the same issue
from dot.
I generated a new executable. Its available here.
Can someone test it and confirm if they are still having this issue or not?
from dot.
from dot.
from dot.
from dot.
If this new executale didn't fix this error, then I guess we need someone that still having this issue to install dot following the instructions under cli-installation. Then they will need to generate the executable following the instructions here
from dot.
@Ghassen-Chaabouni Does the current version of the source code contain a fix or have you not published yet?
from dot.
I published the latest executable but it seems that the issue still exist there.
I don't expect this error to appear if you use the cli of dot instead of the executable. You will need to follow the instructions under cli-installation.
from dot.
e
basically what happens when you try running
dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
from dot.
e
basically what happens when you try running dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
i tried to recreate this issue on the linux, seems like it's windows based problem only
from dot.
e
basically what happens when you try running dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
i tried to recreate this issue on the linux, seems like it's windows based problem only
My guess is that maybe you are running out of GPU memory. Can you confirm if this the case or not by checking nvidia-smi?
from dot.
e
basically what happens when you try running dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
i tried to recreate this issue on the linux, seems like it's windows based problem only
My guess is that maybe you are running out of GPU memory. Can you confirm if this the case or not by checking nvidia-smi?
i've got rtx 4070 ti, 16gb. launch barely makes any impact on gpu memory . it just crashes instantly (running on cpu makes no difference)
from dot.
e
basically what happens when you try running dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
i tried to recreate this issue on the linux, seems like it's windows based problem only
My guess is that maybe you are running out of GPU memory. Can you confirm if this the case or not by checking nvidia-smi?
i've got rtx 4070 ti, 16gb. launch barely makes any impact on gpu memory . it just crashes instantly (running on cpu makes no difference)
Can you run dot on images without a webcam and check if you get the results under test_local
by running this command
dot -c ./configs/simswap.yaml --target data/ --source "data/" --save_folder test_local/ --use_image --use_gpu
Also send me more information about your OS and machine. I will try to reproduce this issue.
from dot.
any updates?
from dot.
any updates?
Are you also getting this error? If so, what python version are you using? DOT was tested with python 3.8
from dot.
any updates?
Are you also getting this error? If so, what python version are you using? DOT was tested with python 3.8
Also can you share info about your OS
from dot.
e
basically what happens when you try running dot -c ./configs/simswap.yaml --target 0 --source "./data" --use_gpu (it's for both with --use_gpu and without). program connects to the webcam and then crashes itself.
i tried to recreate this issue on the linux, seems like it's windows based problem only
My guess is that maybe you are running out of GPU memory. Can you confirm if this the case or not by checking nvidia-smi?
i've got rtx 4070 ti, 16gb. launch barely makes any impact on gpu memory . it just crashes instantly (running on cpu makes no difference)
Can you run dot on images without a webcam and check if you get the results under
test_local
by running this commanddot -c ./configs/simswap.yaml --target data/ --source "data/" --save_folder test_local/ --use_image --use_gpu
Also send me more information about your OS and machine. I will try to reproduce this issue.
Same problem on my side
I tried running both the executable, and the CLI version from scratch. Both crashed except for cv2 in executable version
Replicated the CLI build using conda, python 3.8, same version on cuda, torch, etc. Changing between CPU and GPU use is not resulting in anything.
Executable version error : Winerror 6, the handle is invalid
CLI version error : INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
besides that nothing really, after it turns on the camera for a couple seconds it just stops
Windows 11
16gb ram
11th gen INtel i9-11900H
RTX 3060
Help resolving this issue is appreciated, thanks in advance.
from dot.
Could someone experiencing this problem and having the CLI set up, kindly assists in debugging? I would like to know in which line of code this error is occurring.
from dot.
Could someone experiencing this problem and having the CLI set up, kindly assists in debugging? I would like to know in which line of code this error is occurring.
what do I need to do?
I have to say beforehand that I have a slight different installation process where I install the dlib dependency using conda instead of pip, since it kept failing due to cmake. But was able to get dot installed fine in the end.
from dot.
Could someone experiencing this problem and having the CLI set up, kindly assists in debugging? I would like to know in which line of code this error is occurring.
what do I need to do?
I have to say beforehand that I have a slight different installation process where I install the dlib dependency using conda instead of pip, since it kept failing due to cmake. But was able to get dot installed fine in the end.
A simple debugging is to add some print statements at different points in the code until you locate the line that has the error.
You can also catch the exception and trace the error
from dot.
Could someone experiencing this problem and having the CLI set up, kindly assists in debugging? I would like to know in which line of code this error is occurring.
what do I need to do?
I have to say beforehand that I have a slight different installation process where I install the dlib dependency using conda instead of pip, since it kept failing due to cmake. But was able to get dot installed fine in the end.A simple debugging is to add some print statements at different points in the code until you locate the line that has the error. You can also catch the exception and trace the error
Could you send me files edited with print statements in whichever point you suspect to be the issue? So I can overwrite my local installation files and help run it without having to trace the program flow from scratch.
*i'll try debugging from my side too
from dot.
Could you send me files edited with print statements in whichever point you suspect to be the issue?
I'm not sure what file is causing the issue as I'm still not able to reproduce it so I don't know where to put the prints
from dot.
@bmleeBigby By the way, just to confirm, did you install the required C++ packages from Visual Studio
?
i. Download and install Visual Studio Community from here
ii. Install Desktop development with C++ from the Visual studio installer
from dot.
@bmleeBigby By the way, just to confirm, did you install the required C++ packages from
Visual Studio
?i. Download and install Visual Studio Community from here
ii. Install Desktop development with C++ from the Visual studio installer
Yes I believe I've installed it please check below
However in my case, I changed the dlib to be installed from Conda instead of PIP, because I keep having error "CMake must be installed to build the following extensions: dlib" even after installing the CMake manually and set as PATH. Hope it's not an issue since the DOT installation was successful anyway.
from dot.
@bmleeBigby I generated an executable that can be used to trace the error. Try to download it from here and run it. It should print the error message. Once you get it, paste it in this issue.
If you want to use the CLI, this PR #137 added the tracing to it.
from dot.
are you solved this problem?
from dot.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
File "dot\__main__.py", line 69, in run
File "dot\dot.py", line 131, in generate
File "dot\commons\model_option.py", line 184, in generate_from_camera
File "dot\simswap\option.py", line 83, in create_model
File "dot\simswap\parsing_model\model.py", line 198, in __init__
File "dot\simswap\parsing_model\model.py", line 99, in __init__
File "dot\simswap\parsing_model\resnet.py", line 66, in __init__
File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight
File "torch\hub.py", line 741, in load_state_dict_from_url
sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file))
OSError: [WinError 6] The handle is invalid
Traceback (most recent call last):
File "dot\__main__.py", line 69, in run
File "dot\dot.py", line 131, in generate
File "dot\commons\model_option.py", line 184, in generate_from_camera
File "dot\simswap\option.py", line 83, in create_model
File "dot\simswap\parsing_model\model.py", line 198, in __init__
File "dot\simswap\parsing_model\model.py", line 99, in __init__
File "dot\simswap\parsing_model\resnet.py", line 66, in __init__
File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight
File "torch\hub.py", line 741, in load_state_dict_from_url
sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file))
OSError: [WinError 6] The handle is invalid
Error remains the same, using simswap, and simswap config file
2nd Error when I attempt to manually set the model_path into the resnet18-5c106cde.pth
from dot.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Traceback (most recent call last): File "dot\__main__.py", line 69, in run File "dot\dot.py", line 131, in generate File "dot\commons\model_option.py", line 184, in generate_from_camera File "dot\simswap\option.py", line 83, in create_model File "dot\simswap\parsing_model\model.py", line 198, in __init__ File "dot\simswap\parsing_model\model.py", line 99, in __init__ File "dot\simswap\parsing_model\resnet.py", line 66, in __init__ File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight File "torch\hub.py", line 741, in load_state_dict_from_url sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file)) OSError: [WinError 6] The handle is invalid Traceback (most recent call last): File "dot\__main__.py", line 69, in run File "dot\dot.py", line 131, in generate File "dot\commons\model_option.py", line 184, in generate_from_camera File "dot\simswap\option.py", line 83, in create_model File "dot\simswap\parsing_model\model.py", line 198, in __init__ File "dot\simswap\parsing_model\model.py", line 99, in __init__ File "dot\simswap\parsing_model\resnet.py", line 66, in __init__ File "dot\simswap\parsing_model\resnet.py", line 80, in init_weight File "torch\hub.py", line 741, in load_state_dict_from_url sys.stderr.write('Downloading: "{}" to {}\n'.format(url, cached_file)) OSError: [WinError 6] The handle is invalid
Error remains the same, using simswap, and simswap config file
2nd Error when I attempt to manually set the model_path into the resnet18-5c106cde.pth
I removed the usage of load_state_dict_from_url
as it appears to cause this error. The new executable is here. Let me know if the error still there.
from dot.
@bmleeBigby Thanks for your help. I pushed this fix to main.
from dot.
Can anyone else that used to get this error download the latest executable from here and confirm that DOT is working fine?
from dot.
I am closing for inactivity. If folks are still experiencing this issue, please reopen
from dot.
Related Issues (20)
- dot CLI hangs on ubuntu HOT 1
- Does it possible to improve the quality of face swap in a photo? HOT 4
- WinError 6 The handle is invalid - On all launch options HOT 1
- CLI & GUI INSTALLATION NOT WORKING "FOR CLI: CANT CREATE VIRTUAL ENVIRONMENT" HOT 2
- docker container not working on mac osx
- VIRTUAL CAMERA INJECTION OBS STUDIO INSTALLATION HOT 5
- Great job! Imagine if you could swap your race. HOT 1
- Low FPS with 3070M HOT 7
- feat(infra) create a win vm for dot tests HOT 2
- “dot-executable” is damaged and can’t be opened. You should move it to the Bin. HOT 2
- 'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead. HOT 13
- Runtime Error HOT 2
- Is there any way to use GPU at 100%? (laptop rtx 3080) HOT 2
- No file or directory found: MacOS HOT 4
- How can I use my AMD GPU for DOT? HOT 2
- Dot not swapping image files HOT 2
- NotReadableError: Device in use HOT 2
- How do you actually find the camera number? HOT 2
- No such file or directory: 'saved_models/gpen/weights/RetinaFace-R50.pth' HOT 2
- Increase GPU memory usage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dot.