Giter Club home page Giter Club logo

Comments (42)

bmleeBigby avatar bmleeBigby commented on August 21, 2024 2
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.

Issue resolved !

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024 1

@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 avatar bmleeBigby commented on August 21, 2024 1

@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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024 1

@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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

What OS system you are using and what's the error message in the command prompt?

from dot.

pro100fila avatar pro100fila commented on August 21, 2024

I m using windows 11 and "Winerror 6, the handle is invalid" is the error message in the command prompt.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

neurogen-dev avatar neurogen-dev commented on August 21, 2024

It's certainly great that you removed the duplicates, but, what about a solution to this problem?

from dot.

giorgiop avatar giorgiop commented on August 21, 2024

@Em1tSan can you help us with some testing? :) this issue is hard to reproduce

from dot.

neurogen-dev avatar neurogen-dev commented on August 21, 2024

@Em1tSanМожете ли вы помочь нам с тестированием? :) эту проблему трудно воспроизвести

no problem, what do you need me to do?

from dot.

Freedzone avatar Freedzone commented on August 21, 2024

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.

suomynonami avatar suomynonami commented on August 21, 2024

any fix for this yet i have the same issue

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

suomynonami avatar suomynonami commented on August 21, 2024

from dot.

suomynonami avatar suomynonami commented on August 21, 2024

from dot.

suomynonami avatar suomynonami commented on August 21, 2024

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

neurogen-dev avatar neurogen-dev commented on August 21, 2024

@Ghassen-Chaabouni Does the current version of the source code contain a fix or have you not published yet?

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

kaelkorolevskiy avatar kaelkorolevskiy commented on August 21, 2024

e

image
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.

kaelkorolevskiy avatar kaelkorolevskiy commented on August 21, 2024

e

image 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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

e

image 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.

kaelkorolevskiy avatar kaelkorolevskiy commented on August 21, 2024

e

image 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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

e

image 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.

maxmelichov avatar maxmelichov commented on August 21, 2024

any updates?

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

bmleeBigby avatar bmleeBigby commented on August 21, 2024

e

image 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.

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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

bmleeBigby avatar bmleeBigby commented on August 21, 2024

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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

bmleeBigby avatar bmleeBigby commented on August 21, 2024

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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

@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 avatar bmleeBigby commented on August 21, 2024

@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
image

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.
image

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

@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.

Mkurbanov avatar Mkurbanov commented on August 21, 2024

are you solved this problem?

from dot.

bmleeBigby avatar bmleeBigby commented on August 21, 2024
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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024
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.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

@bmleeBigby Thanks for your help. I pushed this fix to main.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on August 21, 2024

Can anyone else that used to get this error download the latest executable from here and confirm that DOT is working fine?

from dot.

giorgiop avatar giorgiop commented on August 21, 2024

I am closing for inactivity. If folks are still experiencing this issue, please reopen

from dot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.