JavaScript Client Side GAN implementation
While training a GAN, 2 models are used. A generator and a discriminator. This training process usually takes hours (or days) to complete. This is an offline process and is not happening in the browser.
The pict file is the pre-trained model that has been imported to deeplearn.js for inference. The example you have linked to above accepts a sketch drawn in the Canvas and uses the (previously-created) model with deeplearn.js to generate the result. 


The full process used by the Tensorflow port of pix2pix is described here.
https://github.com/affinelayer/pix2pix-tensorflow#getting-started