Page 1 of 1

cudaGetDevice() failed. Status: initialization error

Posted: Wed Dec 08, 2021 3:56 pm
by zhenzong

Code: Select all

t = convert_to_eager_tensor(value, ctx, dtype)
  File "D:\faceswap\anaconda\path\envs\faceswap\lib\site-packages\tensorflow\python\framework\constant_op.py", line 105, in convert_to_eager_tensor
    ctx.ensure_initialized()
  File "D:\faceswap\anaconda\path\envs\faceswap\lib\site-packages\tensorflow\python\eager\context.py", line 555, in ensure_initialized
    context_handle = pywrap_tfe.TFE_NewContext(opts)
tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: initialization error

============ System Information ============
encoding:            cp936
git_branch:          master
git_commits:         09c7d8a Merge branch 'staging' of https://github.com/deepfakes/faceswap into staging. 3852b2b bugfix: Training   - Select correct channel for loss multiplier L2Reg. abb7b00 feat: add support for rectangle cursor shape for masking (#1189). 808e008 Bugfix -Weights freezing/loading for dfl-sae. 8b7b125 Revert "Bugfix -Weights freezing/loading for dfl-sae"
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce GTX 960
gpu_devices_active:  GPU_0
gpu_driver:          432.00
gpu_vram:            GPU_0: 2048MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.19043-SP0
os_release:          10
py_command:          C:\Users\fatty\faceswap\faceswap.py extract -i E:/faceswap/iu/video/76f5df18b9dcdf950410773c56691fca.mp4 -o E:/faceswap/iu/extract -D s3fd -A fan -nm none -rf 8 -min 40 -l 0.4 -sz 512 -een 1 -si 0 -L INFO -gui
py_conda_version:    conda 4.10.3
py_implementation:   CPython
py_version:          3.8.12
py_virtual_env:      True
sys_cores:           16
sys_processor:       AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD
sys_ram:             Total: 16310MB, Available: 8729MB, Used: 7580MB, Free: 8729MB

Re: cudaGetDevice() failed. Status: initialization error

Posted: Wed Dec 08, 2021 6:26 pm
by torzdf

This is an out of memory error message. You may get it to work using the MCNN extractor, but you are going to struggle to do much with a 2GB gpu.