Open GuardSkill opened 3 years ago
It is possible to convert the custom ops to regular ops. StyleGAN's authors have implemented this. You can pass impl='ref'
to each call of e.g. this function.
It is possible to convert the custom ops to regular ops. StyleGAN's authors have implemented this. You can pass
impl='ref'
to each call of e.g. this function.
Very thanks for your help and reply! I have tried it yesterday by passing impl='ref'
in all invoked functions, but I think because I load your model by pickle, it doesn't work. And I am confused about the code about the dnnlib.tflib.Network
Class. So I replace the Cuda python API function of ops with the reference function directly, And it works for me to convert it into Onnx model. I successfully convert it into Onnx model today! By the way, the Onnx model inference time is about 0.5-1s under Onnx runtime, the GPU memory occupation is less than 3G, Awsome! Thanks for your reply and concern!!! XD
Hi @GuardSkill. Could you share the code to convert the pretrained model to Onnx
I found the deployment of StyleGAN is very difficult because of custom ops. Could you provide some help?