rosinality / stylegan2-pytorch

Implementation of Analyzing and Improving the Image Quality of StyleGAN (StyleGAN 2) in PyTorch
MIT License
2.73k stars 621 forks source link

Convert Pth to Pt #251

Open crenaudineau1 opened 3 years ago

crenaudineau1 commented 3 years ago

Hello,

I want to convert .pth model from StyleGAN 2 to .pt (torchscript model) for triton inference with jit trace. How I could do that ?

How I could convert cuda function to torchscript ? fused_bias_act and upfirdn_2d module ?

I have no documentation anywhere to do that.

Thanks a lot.

rosinality commented 3 years ago

I don't know much about registering custom operators in torchscript. I think it would be better to ask in pytorch discuss forums.

Anyway, I found this documents: https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html or you can use pytorch native version of operators.

Zpp-hub commented 1 year ago

May I ask that this problem has been solved, I can't find any information