yuval-alaluf / restyle-encoder

Official Implementation for "ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement" (ICCV 2021) https://arxiv.org/abs/2104.02699
https://yuval-alaluf.github.io/restyle-encoder/
MIT License
1.03k stars 156 forks source link

How long for training?(time, and batch size) #49

Closed tommy-qichang closed 3 years ago

tommy-qichang commented 3 years ago

Hi there, Great work and thank you for sharing this great repository. I've read issue #20, but still unclear about how long for the training in terms of time with specific batch size. Could you please describe a little bit more? I notice that the restyle-PSP training time is significantly longer than the PSP. For instance, with batch 32 on a single RTX 8000, it takes 3.5 hours for 4k iteration, but for restyle-PSP, it takes almost 9.5 hours. I'm not sure if it's because of the recurrent architecture, and moco loss or some errors from my end?

Thanks.

yuval-alaluf commented 3 years ago

For instance, with batch 32 on a single RTX 8000, it takes 3.5 hours for 4k iteration, but for restyle-PSP, it takes almost 9.5 hours.

This makes sense. With ReStyle, you can think of each step as actually being 5 steps since we have 5 iterative feedback steps in a single batch of images. Therefore, it makes sense that it takes a lot longer than pSp. In essence, 4,000 steps in ReStyle is actually more like 20,000 steps (or passes through the networks). Actually, it seems like ReStyle works faster than pSp, which does make some sense because of the lighter architecture. So in my opinion everything looks good :)

tommy-qichang commented 3 years ago

Got it. Thanks.