OpenTalker / StyleHEAT

[ECCV 2022] StyleHEAT: A framework for high-resolution editable talking face generation
MIT License
627 stars 77 forks source link

numpy.core._exceptions.MemoryError: Unable to allocate 2.95 GiB for an array with shape (252, 1024, 1024, 3) and data type float32 #7

Closed c1a1o1 closed 2 years ago

c1a1o1 commented 2 years ago

D:\ProgramData\Anaconda3\python.exe "E:/work/StyleHEAT-main (2)/StyleHEAT-main/inference - test.py" Same-id testing Load pre-trained e4e Encoder from checkpoints/Encoder_e4e.pth done. Load pre-trained hfgi encoder from checkpoints/hfgi.pth done. Load pre-trained StyleGAN2 from checkpoints/StyleGAN_e4e.pth done. Stage: inference Load pre-trained StyleHEAT [net_G_ema] from checkpoints/StyleHEAT_visual.pt done 0%| | 0/1 [00:00<?, ?it/s]D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at ..\c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py:3613: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode) D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py:3982: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. "Default grid_sample and affine_grid behavior has changed " Traceback (most recent call last): File "E:/work/StyleHEAT-main (2)/StyleHEAT-main/inference - test.py", line 224, in main() File "E:/work/StyleHEAT-main (2)/StyleHEAT-main/inference - test.py", line 212, in main reenactment(generator, data) File "E:/work/StyleHEAT-main (2)/StyleHEAT-main/inference - test.py", line 69, in reenactment video_util.write2video("{}/{}".format(args.output_dir, data['video_name']), fake_images) File "E:\work\StyleHEAT-main (2)\StyleHEAT-main\utils\video_util.py", line 21, in write2video video_numpy = (np.transpose(video_numpy, (0, 2, 3, 1)) + 1) / 2.0 * 255.0 numpy.core._exceptions.MemoryError: Unable to allocate 2.95 GiB for an array with shape (252, 1024, 1024, 3) and data type float32