ONNX export for the TUNIT model

I am trying to export the [tunit] model to ONNX format.

The model consists of two subnetworks for inference - an encoder and a generator. The encoder spits out the style representation for a reference image and the generator takes in that style representation and a source image to produce an image that is transformed into the domain of the reference image. Following is an example:

image

However, the generator does not implement forward and which is I am probably not able to export it using onnx. Here’s a Colab Gist that demos the inference process. Please note that I used the animalFaces10_0_00 pre-trained checkpoints. I first copied the files from [here] (https://drive.google.com/drive/folders/1rU1B9OLQjYMBzU6VQX7UwLxod2WzOfNz?usp=sharing) to my personal Drive, created a folder called animalFaces10_0_00, and copied the files to that folder.

As I am a new user, I wasn’t able to supply more than two links. Here’s the GitHub repo of the tunit model: https://github.com/clovaai/tunit.