Giter VIP home page Giter VIP logo

Comments (13)

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

Did you use the executable? If so, it was generaned with windows 10. It may not support windows 11

from dot.

Tobe2d avatar Tobe2d commented on September 17, 2024

@Ghassen-Chaabouni yes I used executable just like the instructions: "run dot.exe"

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

You won't be able to use it then.
You will need to follow the instructions and set up first dot in your machine.
Once you are done can you help us generate an executable for windows 11 by following these steps?

from dot.

Tobe2d avatar Tobe2d commented on September 17, 2024

Yes sure! I will test it now and let you know how it goes

from dot.

Tobe2d avatar Tobe2d commented on September 17, 2024

So when I follow the instruction to set it up I run into this issue:

(dot) C:\dot>dot -c ./configs/simswap.yaml --target 1 --source "H:\Downloads\6WeDztqGoBUwnU6aWfTePSiM.jpeg" --use_gpu

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "C:\Users\xxx\anaconda3\envs\dot\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\xxx\anaconda3\envs\dot\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\xxx\anaconda3\envs\dot\Scripts\dot.exe\__main__.py", line 4, in <module>
  File "C:\dot\src\dot\__init__.py", line 7, in <module>
    from .dot import DOT
  File "C:\dot\src\dot\dot.py", line 11, in <module>
    from .faceswap_cv2 import FaceswapCVOption
  File "C:\dot\src\dot\faceswap_cv2\__init__.py", line 3, in <module>
    from .option import FaceswapCVOption
  File "C:\dot\src\dot\faceswap_cv2\option.py", line 4, in <module>
    import dlib
ImportError: DLL load failed while importing dlib: The specified module could not be found.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

Do you have cuda installed? Can you run this and confirm if the output is True

conda activate dot
python -c "import torch; print(torch.cuda.is_available())"

Can you also give me the output of nvidia-smi?

from dot.

Tobe2d avatar Tobe2d commented on September 17, 2024

python -c "import torch; print(torch.cuda.is_available())"

python -c "import torch; print(torch.cuda.is_available())"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\__init__.py", line 122, in <module>
    raise err
OSError: [WinError 127] The specified procedure could not be found. Error loading "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\lib\caffe2_detectron_ops.dll" or one of its dependencies.

nvidia-smi

Tue Jul 25 01:40:51 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 536.67                 Driver Version: 536.67       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090      WDDM  | 00000000:01:00.0  On |                  Off |
| 30%   36C    P2              73W / 450W |   3723MiB / 24564MiB |      1%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2432    C+G   ...ejd91yc\AdobeNotificationClient.exe    N/A      |
|    0   N/A  N/A      8048    C+G   ... Synapse 3 Host\Razer Synapse 3.exe    N/A      |
|    0   N/A  N/A     17176    C+G   C:\Windows\explorer.exe                   N/A      |
|    0   N/A  N/A     17548    C+G   ...on\114.0.1823.82\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     19196    C+G   ...nt.CBS_cw5n1h2txyewy\SearchHost.exe    N/A      |
|    0   N/A  N/A     19208    C+G   ...2txyewy\StartMenuExperienceHost.exe    N/A      |
|    0   N/A  N/A     20164    C+G   ...les\PowerOCR\PowerToys.PowerOCR.exe    N/A      |
|    0   N/A  N/A     20200    C+G   ...CBS_cw5n1h2txyewy\TextInputHost.exe    N/A      |
|    0   N/A  N/A     20536    C+G   ...eta Quest Remote Desktop Server.exe    N/A      |
|    0   N/A  N/A     21296    C+G   ...auncher\PowerToys.PowerLauncher.exe    N/A      |
|    0   N/A  N/A     21852    C+G   ...aam7r\AcrobatNotificationClient.exe    N/A      |
|    0   N/A  N/A     22184    C+G   ...les\Elgato\CameraHub\Camera Hub.exe    N/A      |
|    0   N/A  N/A     22796    C+G   ...rPicker\PowerToys.ColorPickerUI.exe    N/A      |
|    0   N/A  N/A     23168    C+G   ...FancyZones\PowerToys.FancyZones.exe    N/A      |
|    0   N/A  N/A     24864    C+G   ...\modules\Peek\PowerToys.Peek.UI.exe    N/A      |
|    0   N/A  N/A     25852      C   ...vVirtualCamera\NVIDIA Broadcast.exe    N/A      |
|    0   N/A  N/A     27036    C+G   ...US\ArmouryDevice\asus_framework.exe    N/A      |
|    0   N/A  N/A     27300    C+G   ...es\Elgato\StreamDeck\StreamDeck.exe    N/A      |
|    0   N/A  N/A     31396    C+G   ...on\114.0.1823.82\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     35188    C+G   ...sdPlugin\FlightStreamDeck.AddOn.exe    N/A      |
|    0   N/A  N/A     36428    C+G   ...egxr34yet59cg\Package\QuickLook.exe    N/A      |
|    0   N/A  N/A     37760    C+G   ...oogle\Chrome\Application\chrome.exe    N/A      |
|    0   N/A  N/A     38044    C+G   ...5n1h2txyewy\ShellExperienceHost.exe    N/A      |
|    0   N/A  N/A    108684    C+G   ...\cef\cef.win7x64\steamwebhelper.exe    N/A      |
|    0   N/A  N/A   1209304    C+G   ...2.0_x64__8wekyb3d8bbwe\tcui-app.exe    N/A      |
|    0   N/A  N/A   1273076    C+G   ...__8wekyb3d8bbwe\Notepad\Notepad.exe    N/A      |
|    0   N/A  N/A   1276064    C+G   ...__8wekyb3d8bbwe\WindowsTerminal.exe    N/A      |
+---------------------------------------------------------------------------------------+

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

How did you install pytorch? Did you use pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html ?
Can you also try this

conda activate dot
conda install cudatoolkit=11.1

and then try again

conda activate dot
python -c "import torch; print(torch.cuda.is_available())"

If this didn't fix it, you have CUDA Version: 12.2 it may not be compatible with cudatoolkit 11.1. You may need to install cudatoolkit 11.1. But try the above first.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

We solved a similar issue #55. You can check the discussion

from dot.

Tobe2d avatar Tobe2d commented on September 17, 2024

Thanks for pointing issue #55

I went through it and fixed most of the issues by installing the correct pytorch.

Now when I run:

(dot) C:\dot>dot -c ./configs/simswap.yaml --target 1 --source ""H:\Downloads\face111.png"" --use_gpu

I get this error:

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'models.ArcMarginModel' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'models.ResNet' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'models.SEBlock' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\serialization.py:671: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
'strict' is an invalid keyword argument for load()
=== Control keys ===
1-9: Change avatar
1: H:\Downloads\face111.png
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  ..\c10/core/TensorImpl.h:1156.)
  return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\torch\nn\functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  warnings.warn(
Traceback (most recent call last):
  File "C:\Users\xxx\anaconda3\envs\dot\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\xxx\anaconda3\envs\dot\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\xxx\anaconda3\envs\dot\Scripts\dot.exe\__main__.py", line 7, in <module>
  File "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\click\core.py", line 1126, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\click\core.py", line 1051, in main
    rv = self.invoke(ctx)
  File "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\click\core.py", line 1393, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\xxx\anaconda3\envs\dot\lib\site-packages\click\core.py", line 752, in invoke
    return __callback(*args, **kwargs)
  File "C:\dot\src\dot\__main__.py", line 206, in main
    run(
  File "C:\dot\src\dot\__main__.py", line 67, in run
    _dot.generate(
  File "C:\dot\src\dot\dot.py", line 131, in generate
    option.generate_from_camera(
  File "C:\dot\src\dot\commons\model_option.py", line 185, in generate_from_camera
    camera_pipeline(
  File "C:\dot\src\dot\commons\camera_utils.py", line 71, in camera_pipeline
    img_a_align_crop = process_image(img_a_whole)
  File "C:\dot\src\dot\simswap\option.py", line 180, in process_image
    result_frame = reverse2wholeimage(
  File "C:\dot\src\dot\simswap\util\reverse2original.py", line 136, in reverse2wholeimage
    mat_rev = torch.linalg.inv(mat_rev_initial)
RuntimeError: cusolver error: CUSOLVER_STATUS_INTERNAL_ERROR, when calling `cusolverDnCreate(handle)`
[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (539) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

Running: python -c "import torch; print(torch.cuda.is_available())"
I get:

True

and Running nvidia-smi

Tue Jul 25 18:41:24 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 536.67                 Driver Version: 536.67       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090      WDDM  | 00000000:01:00.0  On |                  Off |
| 30%   36C    P2              72W / 450W |   2942MiB / 24564MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2432    C+G   ...ejd91yc\AdobeNotificationClient.exe    N/A      |
|    0   N/A  N/A      8048    C+G   ... Synapse 3 Host\Razer Synapse 3.exe    N/A      |
|    0   N/A  N/A     17176    C+G   C:\Windows\explorer.exe                   N/A      |
|    0   N/A  N/A     17548    C+G   ...on\114.0.1823.82\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     19196    C+G   ...nt.CBS_cw5n1h2txyewy\SearchHost.exe    N/A      |
|    0   N/A  N/A     19208    C+G   ...2txyewy\StartMenuExperienceHost.exe    N/A      |
|    0   N/A  N/A     20164    C+G   ...les\PowerOCR\PowerToys.PowerOCR.exe    N/A      |
|    0   N/A  N/A     20200    C+G   ...CBS_cw5n1h2txyewy\TextInputHost.exe    N/A      |
|    0   N/A  N/A     20536    C+G   ...eta Quest Remote Desktop Server.exe    N/A      |
|    0   N/A  N/A     21296    C+G   ...auncher\PowerToys.PowerLauncher.exe    N/A      |
|    0   N/A  N/A     21852    C+G   ...aam7r\AcrobatNotificationClient.exe    N/A      |
|    0   N/A  N/A     22184    C+G   ...les\Elgato\CameraHub\Camera Hub.exe    N/A      |
|    0   N/A  N/A     22796    C+G   ...rPicker\PowerToys.ColorPickerUI.exe    N/A      |
|    0   N/A  N/A     23168    C+G   ...FancyZones\PowerToys.FancyZones.exe    N/A      |
|    0   N/A  N/A     24864    C+G   ...\modules\Peek\PowerToys.Peek.UI.exe    N/A      |
|    0   N/A  N/A     25852      C   ...vVirtualCamera\NVIDIA Broadcast.exe    N/A      |
|    0   N/A  N/A     27036    C+G   ...US\ArmouryDevice\asus_framework.exe    N/A      |
|    0   N/A  N/A     27300    C+G   ...es\Elgato\StreamDeck\StreamDeck.exe    N/A      |
|    0   N/A  N/A     31396    C+G   ...on\114.0.1823.82\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     35188    C+G   ...sdPlugin\FlightStreamDeck.AddOn.exe    N/A      |
|    0   N/A  N/A     36428    C+G   ...egxr34yet59cg\Package\QuickLook.exe    N/A      |
|    0   N/A  N/A     37760    C+G   ...oogle\Chrome\Application\chrome.exe    N/A      |
|    0   N/A  N/A     38044    C+G   ...5n1h2txyewy\ShellExperienceHost.exe    N/A      |
|    0   N/A  N/A    108684    C+G   ...\cef\cef.win7x64\steamwebhelper.exe    N/A      |
|    0   N/A  N/A   1209304    C+G   ...2.0_x64__8wekyb3d8bbwe\tcui-app.exe    N/A      |
|    0   N/A  N/A   1492436    C+G   ...Programs\Microsoft VS Code\Code.exe    N/A      |
|    0   N/A  N/A   1504464    C+G   ...__8wekyb3d8bbwe\WindowsTerminal.exe    N/A      |
|    0   N/A  N/A   1507572    C+G   ...__8wekyb3d8bbwe\Notepad\Notepad.exe    N/A      |
|    0   N/A  N/A   1512988    C+G   ...al\Discord\app-1.0.9015\Discord.exe    N/A      |
+---------------------------------------------------------------------------------------+

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

I think this is an issue with the version of cuda .
Most likely if you run dot with CPU (without --use_gpu) you won't get this error.
For dot we are using cuda 11.1 and you have CUDA Version: 12.2 . When I checked cuda 11.1 https://developer.nvidia.com/cuda-11.1.0-download-archive?target_os=Windows&target_arch=x86_64 , I couldn't find windows 11 support for it.
We will need to update pytorch and cuda versions used by dot first. We will keep this issue open until we do that.
Thanks for your help.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

This is the new version of the executable link. It was tested on windows 10 and 11. You can try it and confirm if you are still getting the same error or not.

from dot.

Ghassen-Chaabouni avatar Ghassen-Chaabouni commented on September 17, 2024

@Tobe2d this error may be due to the torch.linalg.inv function. I replaced it with the same function from cupy.
I generated the executable. It's available here. Can you test it and confirm if it's working or not?
If it doesn't, I will move this operation to CPU because it seems to be working there.

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.