Hangz-nju-cuhk / Talking-Face_PC-AVS

Code for Pose-Controllable Talking Face Generation by Implicitly Modularized Audio-Visual Representation (CVPR 2021)
Creative Commons Attribution 4.0 International
926 stars 168 forks source link

stack expects a non-empty TensorList #52

Open TomatoBoy90 opened 2 years ago

TomatoBoy90 commented 2 years ago

我在运行你的测试代码的时候,出错了: Network [ModulateGenerator] was created. Total number of parameters: 89.6 million. To see the architecture, do print(network). Embedding size is 512, encoder SAP. Network [ResSESyncEncoder] was created. Total number of parameters: 10.4 million. To see the architecture, do print(network). Network [FanEncoder] was created. Total number of parameters: 14.3 million. To see the architecture, do print(network). Network [ResNeXtEncoder] was created. Total number of parameters: 38.0 million. To see the architecture, do print(network). model [AvModel] was created Traceback (most recent call last): File "inference.py", line 107, in main inference_single_audio(opt, path_label, model) File "inference.py", line 48, in inference_single_audio dataloader = data.create_dataloader(opt) File "/aidata/Talking-Face_PC-AVS/data/init.py", line 41, in create_dataloader instance.initialize(opt) File "/aidata/Talking-Face_PC-AVS/data/voxtest_dataset.py", line 123, in initialize self.id_img_tensor = torch.stack(id_img_tensors) RuntimeError: stack expects a non-empty TensorList misc/Input/517600055 1 misc/Pose_Source/517600078 160 misc/Audio_Source/681600002.mp3 misc/Mouth_Source/681600002 363 dummy

stack expects a non-empty TensorList

是按照你的步骤一步一步的做的,发现运行代码的时候有问题

TomatoBoy90 commented 2 years ago

(Talking-Face_PC-AVS) root@1949-2d-dd:/aidata/Talking-Face_PC-AVS# bash experiments/demo_vox.sh ----------------- Options --------------- D_input: single
VGGFace_pretrain_path:
aspect_ratio: 1.0
audio_nc: 256
augment_target: False
batchSize: 16 [default: 2] beta1: 0.5
beta2: 0.999
checkpoints_dir: ./checkpoints
clip_len: 1
crop: False
crop_len: 16
crop_size: 224
data_path: /home/SENSETIME/zhouhang1/Downloads/VoxCeleb2/voxceleb2_train.csv dataset_mode: voxtest
defined_driven: False
dis_feat_rec: False
display_winsize: 224
driven_type: face
driving_pose: True [default: False] feature_encoded_dim: 2560
feature_fusion: concat
filename_tmpl: {:06}.jpg
fitting_iterations: 10
frame_interval: 1
frame_rate: 25
gan_mode: hinge
gen_video: True [default: False] generate_from_audio_only: True [default: False] generate_interval: 1
gpu_ids: 0
has_mask: False
heatmap_size: 3
hop_size: 160
how_many: inf
init_type: xavier
init_variance: 0.02
input_id_feature: True [default: False] input_path: ./checkpoints/results/input_path isTrain: False [default: None] label_mask: False
lambda_D: 1
lambda_contrastive: 100
lambda_crossmodal: 1
lambda_feat: 10.0
lambda_image: 1.0
lambda_rotate_D: 0.1 [default: 0.1] lambda_softmax: 1000000
lambda_vgg: 10.0
lambda_vggface: 5.0
landmark_align: False
landmark_type: min
list_end: inf
list_num: 0
list_start: 0
load_from_opt_file: False
load_landmark: False
lr: 0.001
lrw_data_path: /home/SENSETIME/zhouhang1/Downloads/VoxCeleb2/voxceleb2_train.csv max_dataset_size: 9223372036854775807
meta_path_vox: ./misc/demo.csv
mode: cpu
model: av
multi_gpu: False
nThreads: 4 [default: 1] n_mel_T: 4
name: demo
ndf: 64
nef: 16
netA: resseaudio
netA_sync: ressesync
netD: multiscale
netE: fan
netG: modulate
netV: resnext
ngf: 64
no_TTUR: False
no_flip: True
no_ganFeat_loss: False
no_gaussian_landmark: False
no_id_loss: False
no_instance: False
no_pairing_check: False
no_spectrogram: False
no_vgg_loss: False
noise_pose: True [default: False] norm_A: spectralinstance
norm_D: spectralinstance
norm_E: spectralinstance
norm_G: spectralinstance
num_bins_per_frame: 4
num_classes: 5830
num_clips: 1
num_frames_per_clip: 5
num_inputs: 1
onnx: False
optimizer: adam
output_nc: 3
phase: test
pose_dim: 12
positional_encode: False
preprocess_mode: resize_and_crop
results_dir: ./results/
save_path: ./results/
serial_batches: False
start_ind: 0
style_dim: 2560 [default: 2580] style_feature_loss: True [default: False] target_crop_len: 0
train_dis_pose: False
train_recognition: False
train_sync: False
train_word: False
trainer: audio
use_audio: 1
use_audio_id: 0
use_transformer: False
verbose: False
vgg_face: False
which_epoch: latest
word_loss: False
----------------- End ------------------- Network [ModulateGenerator] was created. Total number of parameters: 89.6 million. To see the architecture, do print(network). Embedding size is 512, encoder SAP. Network [ResSESyncEncoder] was created. Total number of parameters: 10.4 million. To see the architecture, do print(network). Network [FanEncoder] was created. Total number of parameters: 14.3 million. To see the architecture, do print(network). Network [ResNeXtEncoder] was created. Total number of parameters: 38.0 million. To see the architecture, do print(network). model [AvModel] was created Traceback (most recent call last): File "inference.py", line 107, in main inference_single_audio(opt, path_label, model) File "inference.py", line 48, in inference_single_audio dataloader = data.create_dataloader(opt) File "/aidata/Talking-Face_PC-AVS/data/init.py", line 41, in create_dataloader instance.initialize(opt) File "/aidata/Talking-Face_PC-AVS/data/voxtest_dataset.py", line 123, in initialize self.id_img_tensor = torch.stack(id_img_tensors) RuntimeError: stack expects a non-empty TensorList misc/Input/517600055 1 misc/Pose_Source/517600078 160 misc/Audio_Source/681600002.mp3 misc/Mouth_Source/681600002 363 dummy

stack expects a non-empty TensorList

wwqy commented 1 year ago

你好,我也遇到了相同的问题,请问你解决了吗?