-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accelerate the training process #6
Comments
I am also trying to reimplement the paper, can you help me with some of my questions? Thank you very much!
|
BTW, may I ask how many GPUs do you use to train this, and how much time does it take for you to converge in large ids? |
in the follow up paper EmoPortraits that is going to be released in July with models / and new video dataset - EmoPortraits - https://github.com/neeek2303/EMOPortraits they say the drop the features from 512 -> 128. it may help - though - we need more compute. WRT -1 - I think we can assume it's 64x64 WRT 2.
https://github.com/johndpope/MegaPortrait-hack/blob/main/model.py#L866 I put in a debug flag in models.py - that will show all the dimensions 2024-05-27 16:47:49,730 - DEBUG - image x: torch.Size([1, 3, 256, 256])
2024-05-27 16:47:49,846 - DEBUG - After conv: torch.Size([1, 64, 256, 256])
2024-05-27 16:47:49,846 - DEBUG - ResBlock_Custom > x.shape: torch.Size([1, 64, 256, 256])
2024-05-27 16:47:49,877 - DEBUG - After resblock_128: torch.Size([1, 128, 256, 256])
2024-05-27 16:47:49,878 - DEBUG - After avgpool: torch.Size([1, 128, 128, 128])
2024-05-27 16:47:49,878 - DEBUG - ResBlock_Custom > x.shape: torch.Size([1, 128, 128, 128])
2024-05-27 16:47:49,885 - DEBUG - After resblock_256: torch.Size([1, 256, 128, 128])
2024-05-27 16:47:49,885 - DEBUG - After avgpool: torch.Size([1, 256, 64, 64])
2024-05-27 16:47:49,885 - DEBUG - ResBlock_Custom > x.shape: torch.Size([1, 256, 64, 64])
2024-05-27 16:47:49,889 - DEBUG - After resblock_512: torch.Size([1, 512, 64, 64])
2024-05-27 16:47:49,891 - DEBUG - After conv_1: torch.Size([1, 1536, 64, 64])
2024-05-27 16:47:49,891 - DEBUG - reshape 1546 -> C96 x D16 : torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,891 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,893 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - After resblock3D_96: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,895 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,896 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,896 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,896 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,896 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,897 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,897 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,897 - DEBUG - After resblock3D_96_2: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,897 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,897 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - After resblock3D_96_1: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,898 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,899 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,899 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,899 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,899 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - After resblock3D_96_1_2: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,900 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - After resblock3D_96_2: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,901 - DEBUG - conv1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - norm1 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - conv2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - norm2 > out.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - residual > residual.shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:49,902 - DEBUG - After resblock3D_96_2_2: torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,005 - DEBUG - 👤 head_pose shape Should print: torch.Size([1, 6]):torch.Size([1, 6])
2024-05-27 16:47:50,005 - DEBUG - 📐 rotation shape Should print: torch.Size([1, 3]):torch.Size([1, 3])
2024-05-27 16:47:50,005 - DEBUG - 📷 translation shape Should print: torch.Size([1, 3]):torch.Size([1, 3])
2024-05-27 16:47:50,039 - DEBUG - pitch:tensor([0.1282], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,040 - DEBUG - yaw:tensor([0.0704], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,041 - DEBUG - roll:tensor([0.0335], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,054 - DEBUG - 👤 head_pose shape Should print: torch.Size([1, 6]):torch.Size([1, 6])
2024-05-27 16:47:50,054 - DEBUG - 📐 rotation shape Should print: torch.Size([1, 3]):torch.Size([1, 3])
2024-05-27 16:47:50,054 - DEBUG - 📷 translation shape Should print: torch.Size([1, 3]):torch.Size([1, 3])
2024-05-27 16:47:50,056 - DEBUG - pitch:tensor([0.1268], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,060 - DEBUG - yaw:tensor([0.0713], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,061 - DEBUG - roll:tensor([0.0258], device='cuda:0', grad_fn=<SelectBackward0>)
2024-05-27 16:47:50,066 - DEBUG - es shape:torch.Size([1, 512, 4, 4])
2024-05-27 16:47:50,066 - DEBUG - zs shape:torch.Size([1, 512, 4, 4])
2024-05-27 16:47:50,066 - DEBUG - FlowField > zs sum.shape:torch.Size([1, 512, 4, 4])
2024-05-27 16:47:50,068 - DEBUG - conv1x1 > x.shape:torch.Size([1, 2048, 4, 4])
2024-05-27 16:47:50,068 - DEBUG - reshape_layer > x.shape:torch.Size([1, 512, 4, 4, 4])
2024-05-27 16:47:50,068 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 512, 4, 4, 4])
2024-05-27 16:47:50,070 - DEBUG - conv1 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,070 - DEBUG - norm1 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,070 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,071 - DEBUG - conv2 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,072 - DEBUG - norm2 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,073 - DEBUG - residual > residual.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,075 - DEBUG - upsample1 > x.shape:torch.Size([1, 256, 8, 8, 8])
2024-05-27 16:47:50,075 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 256, 8, 8, 8])
2024-05-27 16:47:50,076 - DEBUG - conv1 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,077 - DEBUG - norm1 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,077 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,078 - DEBUG - conv2 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,079 - DEBUG - norm2 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,080 - DEBUG - residual > residual.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,081 - DEBUG - upsample2 > x.shape:torch.Size([1, 128, 16, 16, 16])
2024-05-27 16:47:50,081 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 128, 16, 16, 16])
2024-05-27 16:47:50,082 - DEBUG - conv1 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,083 - DEBUG - norm1 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,083 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,084 - DEBUG - conv2 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,084 - DEBUG - norm2 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,087 - DEBUG - residual > residual.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,087 - DEBUG - upsample3 > x.shape:torch.Size([1, 64, 16, 32, 32])
2024-05-27 16:47:50,087 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 64, 16, 32, 32])
2024-05-27 16:47:50,088 - DEBUG - conv1 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,089 - DEBUG - norm1 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,089 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,091 - DEBUG - conv2 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,091 - DEBUG - norm2 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,093 - DEBUG - residual > residual.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,093 - DEBUG - upsample4 > x.shape:torch.Size([1, 32, 16, 64, 64])
2024-05-27 16:47:50,094 - DEBUG - conv3x3x3 > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,094 - DEBUG - gn > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,094 - DEBUG - F.relu > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,096 - DEBUG - tanh > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,096 - DEBUG - w_em_s2c: :torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,127 - DEBUG - w_rt_s2c: :torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,129 - DEBUG - w_em_s2c_resized: torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,129 - DEBUG - vs shape:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,129 - DEBUG - 🍏 apply_warping_field v:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,129 - DEBUG - warp_field:torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,130 - DEBUG - Resized warp_field:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,130 - DEBUG - Canonical grid:torch.Size([16, 64, 64, 3])
2024-05-27 16:47:50,130 - DEBUG - Batch grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,130 - DEBUG - Warped grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,131 - DEBUG - Normalization factors:tensor([63, 63, 15], device='cuda:0')
2024-05-27 16:47:50,132 - DEBUG - Normalized warped grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,133 - DEBUG - v_canonical:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,164 - DEBUG - FlowField > zs sum.shape:torch.Size([1, 512, 4, 4])
2024-05-27 16:47:50,164 - DEBUG - conv1x1 > x.shape:torch.Size([1, 2048, 4, 4])
2024-05-27 16:47:50,164 - DEBUG - reshape_layer > x.shape:torch.Size([1, 512, 4, 4, 4])
2024-05-27 16:47:50,164 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 512, 4, 4, 4])
2024-05-27 16:47:50,165 - DEBUG - conv1 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,165 - DEBUG - norm1 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,165 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,165 - DEBUG - conv2 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,166 - DEBUG - norm2 > out.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,166 - DEBUG - residual > residual.shape:torch.Size([1, 256, 4, 4, 4])
2024-05-27 16:47:50,166 - DEBUG - upsample1 > x.shape:torch.Size([1, 256, 8, 8, 8])
2024-05-27 16:47:50,166 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 256, 8, 8, 8])
2024-05-27 16:47:50,166 - DEBUG - conv1 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,166 - DEBUG - norm1 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,166 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,167 - DEBUG - conv2 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,167 - DEBUG - norm2 > out.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,167 - DEBUG - residual > residual.shape:torch.Size([1, 128, 8, 8, 8])
2024-05-27 16:47:50,167 - DEBUG - upsample2 > x.shape:torch.Size([1, 128, 16, 16, 16])
2024-05-27 16:47:50,167 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 128, 16, 16, 16])
2024-05-27 16:47:50,167 - DEBUG - conv1 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,168 - DEBUG - norm1 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,168 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,168 - DEBUG - conv2 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,169 - DEBUG - norm2 > out.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,169 - DEBUG - residual > residual.shape:torch.Size([1, 64, 16, 16, 16])
2024-05-27 16:47:50,169 - DEBUG - upsample3 > x.shape:torch.Size([1, 64, 16, 32, 32])
2024-05-27 16:47:50,169 - DEBUG - 🍒 ResBlock3D x.shape:torch.Size([1, 64, 16, 32, 32])
2024-05-27 16:47:50,169 - DEBUG - conv1 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - norm1 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - F.relu(out) > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - conv2 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - norm2 > out.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - residual > residual.shape:torch.Size([1, 32, 16, 32, 32])
2024-05-27 16:47:50,170 - DEBUG - upsample4 > x.shape:torch.Size([1, 32, 16, 64, 64])
2024-05-27 16:47:50,171 - DEBUG - conv3x3x3 > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,171 - DEBUG - gn > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,171 - DEBUG - F.relu > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,171 - DEBUG - tanh > x.shape:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - w_em_c2d_resized:torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - w_c2d shape:torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - 🍏 apply_warping_field v:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - warp_field:torch.Size([1, 3, 64, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - Resized warp_field:torch.Size([1, 3, 16, 64, 64])
2024-05-27 16:47:50,173 - DEBUG - Canonical grid:torch.Size([16, 64, 64, 3])
2024-05-27 16:47:50,173 - DEBUG - Batch grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,173 - DEBUG - Warped grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,174 - DEBUG - Normalization factors:tensor([63, 63, 15], device='cuda:0')
2024-05-27 16:47:50,174 - DEBUG - Normalized warped grid:torch.Size([1, 16, 64, 64, 3])
2024-05-27 16:47:50,174 - DEBUG - v_canonical:torch.Size([1, 96, 16, 64, 64])
2024-05-27 16:47:50,177 - DEBUG - G2d > x:torch.Size([1, 96, 64, 64]) |
@flyingshan Regarding to your questions:
|
@flyingshan - maybe this helps - johndpope/MegaPortrait-hack#18 |
Hello guys, a quick question, when increasing the number of IDs, losses converge slowly , comparing with the a small dataset(contains 4/50 Ids), how can I boost the training speed?
The text was updated successfully, but these errors were encountered: