yuval-alaluf/stylegan3-editing

Exporting trained StyleGan3_Nada model to torchscript

muhammad-ahmed-ghani opened this issue · 1 comments

RuntimeError:
cannot statically infer the expected size of a list in this context:
File "/content/stylegan_nada/ZSSGAN/op/fused_act.py", line 110
return (
F.leaky_relu(
input + bias.view(1, bias.shape[0], *rest_dim), negative_slope=0.2
~~~~~~~~~ <--- HERE
)
* scale
'fused_leaky_relu' is being compiled since it was called from 'EqualLinear.forward'
File "/content/stylegan_nada/ZSSGAN/model/sg2_model.py", line 154
if self.activation:
out = F.linear(input, self.weight * self.scale)
out = fused_leaky_relu(out, self.bias * self.lr_mul)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE

Not sure I exactly follow what you pasted above. And we're not really familiar with torchscript. You should try asking this question on the NADA repo as this seems to be more relevant to their codebase.