From 53798281a1a0ded6a91f6ed5758eabee79cf0feb Mon Sep 17 00:00:00 2001 From: Saquib Alam Date: Fri, 4 Aug 2023 03:37:40 +0530 Subject: [PATCH] Update nodes_latent.py --- comfy_extras/nodes_latent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy_extras/nodes_latent.py b/comfy_extras/nodes_latent.py index 9261b7bfc..acbb98339 100644 --- a/comfy_extras/nodes_latent.py +++ b/comfy_extras/nodes_latent.py @@ -2,7 +2,7 @@ import torch from nodes import MAX_RESOLUTION # diffusers library scale the random noise -vae_scaling_factor = 0.18215 +vae_scaling_factor = 0.18215 # doesn't work class NoisyLatentImage: def __init__(self, device="cpu"): @@ -22,7 +22,7 @@ class NoisyLatentImage: def generate(self, seed, width, height, batch_size=1): generator = torch.manual_seed(seed) - latent = torch.randn([batch_size, 4, height // 8, width // 8], generator=generator, device=self.device) * vae_scaling_factor + latent = torch.randn([batch_size, 4, height // 8, width // 8], generator=generator, device=self.device) return ({"samples":latent}, )