cudaGetDevice() failed. Status: initialization error

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
zhenzong
Posts: 1
Joined: Wed Dec 08, 2021 1:41 pm
Has thanked: 1 time

cudaGetDevice() failed. Status: initialization error

Post 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
User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: cudaGetDevice() failed. Status: initialization error

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

My word is final

Locked