Using the U-Net GAN for Dimension Reduction

I am playing around with using various generative models for dimension reduction and want to know how I might separate the encoder of a trained Unet GAN into a separate model which could be used for dimension reduction – can anyone point me towards how I might do that?

Also, has anyone tried this? Does anyone see any issues theoretically with using this architecture for this purpose?

Thank you!