YudongGuo / AD-NeRF

This repository contains a PyTorch implementation of "AD-NeRF: Audio Driven Neural Radiance Fields for Talking Head Synthesis".
MIT License
1.03k stars 173 forks source link

RuntimeError: CUDA error: initialization error #82

Open xugaoxiang opened 2 years ago

xugaoxiang commented 2 years ago

when I run bash process_data.sh Obama, error occured

--- Step 4: extract background image --- 1400 2.0486092567443848 -9.598418235778809 find best focal 1200 2.07476806640625 -8.41795825958252 Traceback (most recent call last): File "data_util/face_tracking/face_tracker.py", line 218, in <module> sel_light.to(device_render)) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/AD-NeRF/data_util/face_tracking/render_3dmm.py", line 189, in forward rendered_img = self.renderer(mesh) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/renderer.py", line 59, in forward fragments = self.rasterizer(meshes_world, **kwargs) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterizer.py", line 203, in forward cull_to_frustum=raster_settings.cull_to_frustum, File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterize_meshes.py", line 246, in rasterize_meshes cull_backfaces, File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterize_meshes.py", line 320, in forward cull_backfaces, RuntimeError: CUDA error: initialization error

I check the file face_tracker.py, torch.device('cuda:0') throw the error, but it's correct running in the ipython。

pytorch3d 0.6.1 /app/workshop/github/pytorch3d torch 1.8.1+cu101 torchaudio 0.8.0a0+e4e171a torchvision 0.2.2

pytorch3d was installed from source code and use pip install -e .

thanks.

Janie1996 commented 2 years ago

when I run bash process_data.sh Obama, error occured

--- Step 4: extract background image --- 1400 2.0486092567443848 -9.598418235778809 find best focal 1200 2.07476806640625 -8.41795825958252 Traceback (most recent call last): File "data_util/face_tracking/face_tracker.py", line 218, in <module> sel_light.to(device_render)) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/AD-NeRF/data_util/face_tracking/render_3dmm.py", line 189, in forward rendered_img = self.renderer(mesh) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/renderer.py", line 59, in forward fragments = self.rasterizer(meshes_world, **kwargs) File "/home/longjing/anaconda3/envs/adnerf/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterizer.py", line 203, in forward cull_to_frustum=raster_settings.cull_to_frustum, File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterize_meshes.py", line 246, in rasterize_meshes cull_backfaces, File "/app/workshop/github/pytorch3d/pytorch3d/renderer/mesh/rasterize_meshes.py", line 320, in forward cull_backfaces, RuntimeError: CUDA error: initialization error

I check the file face_tracker.py, torch.device('cuda:0') throw the error, but it's correct running in the ipython。

pytorch3d 0.6.1 /app/workshop/github/pytorch3d torch 1.8.1+cu101 torchaudio 0.8.0a0+e4e171a torchvision 0.2.2

pytorch3d was installed from source code and use pip install -e .

thanks.

I encountered the same error. Did you solve that?

xugaoxiang commented 2 years ago

@Janie1996 not yet.

muxiddin19 commented 2 years ago

Hi! In my case, when I run this code, bash process_data.sh Obama I got the error below: FileNotFoundError: [Errno 2] No such file or directory: 'dataset/Obama/track_params.pt' Could you please give me tips on how to solve this one?