michaildoukas / head2head

PyTorch implementation for Head2Head and Head2Head++. It can be used to fully transfer the head pose, facial expression and eye movements from a source video to a target identity.
MIT License
310 stars 44 forks source link

RuntimeError: simple_bind error. Arguments: #12

Open mayanktiwariiiitdmj opened 3 years ago

mayanktiwariiiitdmj commented 3 years ago

When I am running the Reenactment demo using the following command:

./scripts/demo/run_demo_on_target.sh Putin head2headDataset

I am getting the following exception:

------------ Options -------------
ROI_size: 72
batchSize: 1
checkpoints_dir: checkpoints/head2headDataset
dataroot: datasets/head2headDataset/dataset
dataset_mode: video
demo_dir: results_demo
display_id: 0
display_winsize: 512
do_reenactment: True
gpu_ids: [0, 1]
input_nc: 6
isTrain: False
loadSize: 256
load_pretrain: 
max_n_sequences: None
nThreads: 0
n_blocks: 9
n_downsample_G: 3
n_frames_G: 3
name: head2head_Putin
ndf: 64
ngf: 64
no_augment_input: False
no_eye_gaze: False
no_first_img: True
no_mouth_D: False
no_prev_output: False
norm: instance
output_nc: 3
phase: test
resize: True
results_dir: results/head2headDataset
serial_batches: False
source_name: None
target_name: Putin
tf_log: False
time_fwd_pass: False
use_eyes_D: False
use_faceflow: True
which_epoch: latest
-------------- End ----------------
---------- Generator loaded -------------
[16:31:42] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.5.0. Attempting to upgrade...
[16:31:42] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[16:31:43] src/base.cc:51: Upgrade advisory: this mxnet has been built against cuda library version 9020, which is older than the oldest version tested by CI (10000).  Set MXNET_CUDA_LIB_CHECKING=0 to quiet this warning.
[16:31:43] src/base.cc:80: cuDNN lib mismatch: linked-against version 7603 != compiled-against version 7605.  Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
Traceback (most recent call last):
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/symbol/symbol.py", line 1832, in simple_bind
    ctypes.byref(exe_handle)))
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/base.py", line 246, in check_call
    raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
  File "src/engine/./../common/cuda_utils.h", line 395
CUDA: Check failed: e == cudaSuccess || e == cudaErrorCudartUnloading: invalid device ordinal

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "demo.py", line 311, in <module>
    main()
  File "demo.py", line 172, in main
    renderer = NMFCRenderer(opt)
  File "/home/nitin/head2head/preprocessing/reconstruction.py", line 147, in __init__
    self.handler = fc_predictor.Handler(model_prefix, model_epoch, 192, args.gpu_id)
  File "/home/nitin/head2head/preprocessing/multiface/fc_predictor.py", line 54, in __init__
    model.bind(for_training=False, data_shapes=[('data', (1, 3, image_size[0], image_size[1]))])
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/module/module.py", line 429, in bind
    state_names=self._state_names)
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/module/executor_group.py", line 280, in __init__
    self.bind_exec(data_shapes, label_shapes, shared_group)
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/module/executor_group.py", line 384, in bind_exec
    shared_group))
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/module/executor_group.py", line 678, in _bind_ith_exec
    shared_buffer=shared_data_arrays, **input_shapes)
  File "/home/nitin/anaconda3/envs/head2head/lib/python3.7/site-packages/mxnet/symbol/symbol.py", line 1838, in simple_bind
    raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 192, 192)
Traceback (most recent call last):
  File "src/engine/./../common/cuda_utils.h", line 395
CUDA: Check failed: e == cudaSuccess || e == cudaErrorCudartUnloading: invalid device ordinal
double free or corruption (!prev)
./scripts/demo/run_demo_on_target.sh: line 13:  6159 Aborted                 (core dumped) python demo.py --checkpoints_dir checkpoints/$dataset_name --results_dir results/$dataset_name --target_name $target_name --name head2head_$target_name --dataroot datasets/$dataset_name/dataset --do_reenactment --gpu_ids 0,1 --demo_dir results_demo

Can you please help me in solving this.