yerfor / GeneFace

GeneFace: Generalized and High-Fidelity 3D Talking Face Synthesis; ICLR 2023; Official code
MIT License
2.57k stars 296 forks source link

RTX4090 #190

Open zongxiongzhao opened 1 year ago

zongxiongzhao commented 1 year ago

有朋友在Ubuntu,4090测试成功的吗,分享一下所需环境及依赖

tailangjun commented 1 year ago

我用的就是Ubuntu22.04,显卡4090,跑起来没问题

tailangjun commented 1 year ago

@zongxiongzhao 你把你的错误贴一下看看

zongxiongzhao commented 1 year ago

@tailangjun 我用的docker,搭建环境运行代码老是报错,难道docker和实体机有区别吗 (geneface) root@autodl-container-b37a11a83c-cb82e0e6:~/autodl-tmp/GeneFace-1.1.0# bash scripts/infer_lm3d_radnerf.sh /root/miniconda3/envs/geneface/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/root/miniconda3/envs/geneface/lib/python3.9/site-packages/torchvision/image.so: undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl'If you don't plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source? warn( /root/miniconda3/envs/geneface/lib/python3.9/site-packages/torch/amp/autocast_mode.py:198: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling') | Unknow hparams: [] | Hparams chains: ['egs/egs_bases/radnerf/base.yaml', 'egs/egs_bases/radnerf/lm3d_radnerf.yaml', 'checkpoints/May/lm3d_radnerf_torso/config.yaml'] | Hparams: accumulate_grad_batches: 1, ambient_out_dim: 2, amp: True, base_config: ['egs/egs_bases/radnerf/lm3d_radnerf.yaml'], binary_data_dir: data/binary/videos, bound: 1, camera_offset: [0, 0, 0], camera_scale: 4.0, clip_grad_norm: 0, clip_grad_value: 0, cond_out_dim: 64, cond_type: idexp_lm3d_normalized, cond_win_size: 1, cuda_ray: True, debug: False, density_thresh: 10, density_thresh_torso: 0.01, desired_resolution: 2048, dt_gamma: 0.00390625, eval_max_batches: 100, exp_name: , far: 0.9, finetune_lips: True, finetune_lips_start_iter: 200000, geo_feat_dim: 128, grid_interpolation_type: linear, grid_size: 128, grid_type: tiledgrid, gui_fovy: 21.24, gui_h: 512, gui_max_spp: 1, gui_radius: 3.35, gui_w: 512, head_model_dir: checkpoints/May/lm3d_radnerf, hidden_dim_ambient: 128, hidden_dim_color: 128, hidden_dim_sigma: 128, individual_embedding_dim: 4, individual_embedding_num: 13000, infer: True,

infer_audio_source_name: data/raw/val_wavs/zozo.wav, infer_bg_img_fname: , infer_c2w_name: , infer_cond_name: infer_out/May/pred_lm3d/zozo.npy, infer_lm3d_clamp_std: 2.5, infer_lm3d_lle_percent: 0.0, infer_lm3d_smooth_sigma: 0.0, infer_out_video_name: infer_out/May/pred_video/zozo_radnerf_torso_smo.mp4, infer_scale_factor: 1.0, infer_smo_std: 0.0, infer_smooth_camera_path: True, infer_smooth_camera_path_kernel_size: 7, lambda_ambient: 0.1, lambda_lpips_loss: 0.01, lambda_weights_entropy: 0.0001, load_ckpt: , load_imgs_to_memory: False, log2_hashmap_size: 16, lr: 0.0005, max_ray_batch: 4096, max_steps: 16, max_updates: 250000, min_near: 0.05, n_rays: 65536, near: 0.3, num_ckpt_keep: 1, num_layers_ambient: 3, num_layers_color: 2, num_layers_sigma: 3, num_sanity_val_steps: 2, num_steps: 16, num_valid_plots: 5, optimizer_adam_beta1: 0.9, optimizer_adam_beta2: 0.999, print_nan_grads: False, processed_data_dir: data/processed/videos, raw_data_dir: data/raw/videos, resume_from_checkpoint: 0, save_best: True, save_codes: ['tasks', 'modules', 'egs'], save_gt: True, scheduler: exponential, seed: 9999, smo_win_size: 5, smooth_lips: False, task_cls: tasks.radnerfs.radnerf_torso.RADNeRFTorsoTask, tb_log_interval: 100, torso_head_aware: False, torso_individual_embedding_dim: 8, torso_shrink: 0.8, torso_train_mode: 1, update_extra_interval: 16, upsample_steps: 0, use_window_cond: True, val_check_interval: 2000, valid_infer_interval: 10000, valid_monitor_key: val_loss, valid_monitor_mode: min, validate: False, video_id: May, warmup_updates: 0, weight_decay: 0, with_att: True, work_dir: checkpoints/May/lm3d_radnerf_torso, 08/30 05:50:22 PM GPU available: False, GPU used: [1] trainval: Smooth head trajectory (rotation and translation) with a window size of 7 Traceback (most recent call last): File "/root/autodl-tmp/GeneFace-1.1.0/inference/nerfs/lm3d_radnerf_infer.py", line 99, in LM3d_RADNeRFInfer.example_run(inp) File "/root/autodl-tmp/GeneFace-1.1.0/inference/nerfs/base_nerf_infer.py", line 299, in example_run infer_ins = cls(hp) File "/root/autodl-tmp/GeneFace-1.1.0/inference/nerfs/lm3d_radnerf_infer.py", line 15, in init self.dataset = self.dataset_cls('trainval', training=False) File "/root/autodl-tmp/GeneFace-1.1.0/tasks/radnerfs/dataset_utils.py", line 104, in init lms = np.loadtxt(os.path.join(hparams['processed_data_dir'],hparams['video_id'], 'ori_imgs', str(img_id) + '.lms')) # [68, 2] File "/root/miniconda3/envs/geneface/lib/python3.9/site-packages/numpy/lib/npyio.py", line 1356, in loadtxt arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, File "/root/miniconda3/envs/geneface/lib/python3.9/site-packages/numpy/lib/npyio.py", line 975, in _read fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) File "/root/miniconda3/envs/geneface/lib/python3.9/site-packages/numpy/lib/_datasource.py", line 193, in open return ds.open(path, mode, encoding=encoding, newline=newline) File "/root/miniconda3/envs/geneface/lib/python3.9/site-packages/numpy/lib/_datasource.py", line 533, in open raise FileNotFoundError(f"{path} not found.") FileNotFoundError: data/processed/videos/May/ori_imgs/0.lms not found. 很多报错,.lms文件报错,这个文件是从哪里生成的

tailangjun commented 1 year ago

User provided device_type of 'cuda', but CUDA is not available. Disabling 貌似你的 CUDA没安装好

我用的 CUDA11.7 + python3.9 + pytorch1.13.1

zongxiongzhao commented 1 year ago

@tailangjun 你用的是linux还是win

tailangjun commented 1 year ago

ubuntu22.04

WHalcyon commented 1 year ago

How fast is inference on a 4090?

用4090生成速度怎么样?

tailangjun commented 1 year ago

How fast is inference on a 4090?

用4090生成速度怎么样?

推理还挺快的,比方说这个 6296帧480x480的视频,时长 00:04:11.84,耗时 03:35,可以做到实时的。

NeRF is rendering frames...: 100%|█████████████████████████████████████████████████████████████████████████████████| 6296/6296 [03:35<00:00, 29.21it/s]

ChengsongLu commented 10 months ago

How fast is inference on a 4090? 用4090生成速度怎么样?

推理还挺快的,比方说这个 6296帧480x480的视频,时长 00:04:11.84,耗时 03:35,可以做到实时的。

NeRF is rendering frames...: 100%|█████████████████████████████████████████████████████████████████████████████████| 6296/6296 [03:35<00:00, 29.21it/s]

朋友,你有“~/.cache/torch_extensions/py39_cu118/_grid_encoder/_grid_encoder.so”这个文件吗,我这里一直因为没有这个文件走不完demo最后一步,不知道怎么解决,也是4090