From 4a0774b260c73c11d50ab98b8cccbd006aa10cc6 Mon Sep 17 00:00:00 2001 From: Sergey Borisov Date: Thu, 20 Jul 2023 18:54:51 +0300 Subject: [PATCH] Use scale from vae --- invokeai/app/invocations/latent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index b4c3454c88..6082057bd3 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -764,7 +764,7 @@ class ImageToLatentsInvocation(BaseInvocation): dtype=vae.dtype ) # FIXME: uses torch.randn. make reproducible! - latents = 0.18215 * latents + latents = vae.config.scaling_factor * latents latents = latents.to(dtype=orig_dtype) name = f"{context.graph_execution_state_id}__{self.id}"