From cc8190105408fb56c0fbc4767eb43dc5498ccda5 Mon Sep 17 00:00:00 2001 From: patil-suraj Date: Fri, 10 Jun 2022 01:12:23 +0200 Subject: [PATCH] process image --- models/vision/latent_diffusion/modeling_latent_diffusion.py | 1 + 1 file changed, 1 insertion(+) diff --git a/models/vision/latent_diffusion/modeling_latent_diffusion.py b/models/vision/latent_diffusion/modeling_latent_diffusion.py index 99c9b2e0..cb832544 100644 --- a/models/vision/latent_diffusion/modeling_latent_diffusion.py +++ b/models/vision/latent_diffusion/modeling_latent_diffusion.py @@ -961,5 +961,6 @@ class LatentDiffusion(DiffusionPipeline): image = 1 / 0.18215 * image image = self.vqvae.decode(image) image = torch.clamp((image+1.0)/2.0, min=0.0, max=1.0) + image = 255. * image return image