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.

Post Reply
User avatar
Copula
Posts: 1
Joined: Wed Nov 23, 2022 12:11 am

cudaGetDevice() failed. Status: initialization error

Post by Copula »

Hi, I have this trouble. Can you please help with this?

Code: Select all

Initializing: MTCNN: (model_path: '['C:\\Users\\faceswap\\.fs_cache\\mtcnn_det_v2.1.h5', 'C:\\Users\\faceswap\\.fs_cache\\mtcnn_det_v2.2.h5', 'C:\\Users\\faceswap\\.fs_cache\\mtcnn_det_v2.3.h5']', allow_growth: False, exclude_gpus: None, input_size: 640, minsize: 20, threshold: [0.6, 0.7, 0.7], factor: 0.709)
Traceback (most recent call last):
  File "C:\Users\faceswap\lib\cli\launcher.py", line 217, in execute_script
    process.process()
  File "C:\Users\faceswap\scripts\extract.py", line 165, in process
    extract.process()
  File "C:\Users\faceswap\scripts\extract.py", line 689, in process
    self._run_extraction()
  File "C:\Users\faceswap\scripts\extract.py", line 709, in _run_extraction
    self._extractor.launch()
  File "C:\Users\faceswap\plugins\extract\pipeline.py", line 272, in launch
    self._launch_plugin(phase)
  File "C:\Users\faceswap\plugins\extract\pipeline.py", line 701, in _launch_plugin
    plugin.initialize(**kwargs)
  File "C:\Users\faceswap\plugins\extract\_base.py", line 482, in initialize
    self.init_model()
  File "C:\Users\faceswap\plugins\extract\detect\mtcnn.py", line 68, in init_model
    self.model = MTCNN(self.model_path,
  File "C:\Users\faceswap\plugins\extract\detect\mtcnn.py", line 646, in __init__
    self._pnet = PNet(model_path[0],
  File "C:\Users\faceswap\plugins\extract\detect\mtcnn.py", line 176, in __init__
    super().__init__("MTCNN-PNet",
  File "C:\Users\faceswap\lib\model\session.py", line 70, in __init__
    self._context = self._set_session(allow_growth,
  File "C:\Users\faceswap\lib\model\session.py", line 187, in _set_session
    retval = tf.device("/device:cpu:0")
  File "C:\Users\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\framework\ops.py", line 5510, in device_v2
    return device(device_name)
  File "C:\Users\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\framework\ops.py", line 5459, in device
    return context.device(device_name_or_function)
  File "C:\Users\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\context.py", line 2343, in device
    ensure_initialized()
  File "C:\Users\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\context.py", line 2138, in ensure_initialized
    context().ensure_initialized()
  File "C:\Users\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\context.py", line 611, 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:         ffe8f9a Merge branch 'staging'
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 1060
gpu_devices_active:  GPU_0
gpu_driver:          418.81
gpu_vram:            GPU_0: 6144MB
User avatar
torzdf
Posts: 2112
Joined: Fri Jul 12, 2019 12:53 am
Answers: 140
Has thanked: 101 times
Been thanked: 476 times

Re: cudaGetDevice() failed. Status: initialization error

Post by torzdf »

This is not enough information to diagnose your issue.

app.php/rules#rule-4a

My word is final

Post Reply