better preview
from upstream comfyui
This commit is contained in:
+17
-17
@@ -24,24 +24,24 @@ class LatentPreviewer:
|
||||
|
||||
class Latent2RGBPreviewer(LatentPreviewer):
|
||||
def __init__(self):
|
||||
latent_rgb_factors = [[-0.41, -0.25, -0.26],
|
||||
[-0.26, -0.49, -0.24],
|
||||
[-0.37, -0.54, -0.3],
|
||||
[-0.04, -0.29, -0.29],
|
||||
[-0.52, -0.59, -0.39],
|
||||
[-0.56, -0.6, -0.02],
|
||||
[-0.53, -0.06, -0.48],
|
||||
[-0.51, -0.28, -0.18],
|
||||
[-0.59, -0.1, -0.33],
|
||||
[-0.56, -0.54, -0.41],
|
||||
[-0.61, -0.19, -0.5],
|
||||
[-0.05, -0.25, -0.17],
|
||||
[-0.23, -0.04, -0.22],
|
||||
[-0.51, -0.56, -0.43],
|
||||
[-0.13, -0.4, -0.05],
|
||||
[-0.01, -0.01, -0.48]]
|
||||
latent_rgb_factors = [[-0.0395, -0.0331, 0.0445],
|
||||
[ 0.0696, 0.0795, 0.0518],
|
||||
[ 0.0135, -0.0945, -0.0282],
|
||||
[ 0.0108, -0.0250, -0.0765],
|
||||
[-0.0209, 0.0032, 0.0224],
|
||||
[-0.0804, -0.0254, -0.0639],
|
||||
[-0.0991, 0.0271, -0.0669],
|
||||
[-0.0646, -0.0422, -0.0400],
|
||||
[-0.0696, -0.0595, -0.0894],
|
||||
[-0.0799, -0.0208, -0.0375],
|
||||
[ 0.1166, 0.1627, 0.0962],
|
||||
[ 0.1165, 0.0432, 0.0407],
|
||||
[-0.2315, -0.1920, -0.1355],
|
||||
[-0.0270, 0.0401, -0.0821],
|
||||
[-0.0616, -0.0997, -0.0727],
|
||||
[ 0.0249, -0.0469, -0.1703]]
|
||||
self.latent_rgb_factors = torch.tensor(latent_rgb_factors, device="cpu").transpose(0, 1)
|
||||
self.latent_rgb_factors_bias = torch.tensor([0.138, 0.025, -0.299], device="cpu")
|
||||
self.latent_rgb_factors_bias = torch.tensor([0.0259, -0.0192, -0.0761], device="cpu")
|
||||
|
||||
def decode_latent_to_preview(self, x0):
|
||||
self.latent_rgb_factors = self.latent_rgb_factors.to(dtype=x0.dtype, device=x0.device)
|
||||
|
||||
Reference in New Issue
Block a user