From d5323d16e0c43e7cac54d334e493b71b4ead3ede Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 9 Jul 2023 13:59:09 -0400 Subject: [PATCH] latent2rgb matrix for SDXL. --- comfy/latent_formats.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/comfy/latent_formats.py b/comfy/latent_formats.py index 07937f73da4..96dd7e9484d 100644 --- a/comfy/latent_formats.py +++ b/comfy/latent_formats.py @@ -11,10 +11,10 @@ def __init__(self, scale_factor=0.18215): self.scale_factor = scale_factor self.latent_rgb_factors = [ # R G B - [0.298, 0.207, 0.208], # L1 - [0.187, 0.286, 0.173], # L2 - [-0.158, 0.189, 0.264], # L3 - [-0.184, -0.271, -0.473], # L4 + [ 0.3512, 0.2297, 0.3227], + [ 0.3250, 0.4974, 0.2350], + [-0.2829, 0.1762, 0.2721], + [-0.2120, -0.2616, -0.7177] ] self.taesd_decoder_name = "taesd_decoder.pth" @@ -23,9 +23,9 @@ def __init__(self): self.scale_factor = 0.13025 self.latent_rgb_factors = [ #TODO: these are the factors for SD1.5, need to estimate new ones for SDXL # R G B - [0.298, 0.207, 0.208], # L1 - [0.187, 0.286, 0.173], # L2 - [-0.158, 0.189, 0.264], # L3 - [-0.184, -0.271, -0.473], # L4 + [ 0.3920, 0.4054, 0.4549], + [-0.2634, -0.0196, 0.0653], + [ 0.0568, 0.1687, -0.0755], + [-0.3112, -0.2359, -0.2076] ] self.taesd_decoder_name = "taesdxl_decoder.pth"