Skip to content

Commit 18de0b2

Browse files
Fast preview for hunyuan image. (#9814)
1 parent df6850f commit 18de0b2

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

comfy/latent_formats.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,74 @@ class HunyuanImage21(LatentFormat):
538538
latent_dimensions = 2
539539
scale_factor = 0.75289
540540

541+
latent_rgb_factors = [
542+
[-0.0154, -0.0397, -0.0521],
543+
[ 0.0005, 0.0093, 0.0006],
544+
[-0.0805, -0.0773, -0.0586],
545+
[-0.0494, -0.0487, -0.0498],
546+
[-0.0212, -0.0076, -0.0261],
547+
[-0.0179, -0.0417, -0.0505],
548+
[ 0.0158, 0.0310, 0.0239],
549+
[ 0.0409, 0.0516, 0.0201],
550+
[ 0.0350, 0.0553, 0.0036],
551+
[-0.0447, -0.0327, -0.0479],
552+
[-0.0038, -0.0221, -0.0365],
553+
[-0.0423, -0.0718, -0.0654],
554+
[ 0.0039, 0.0368, 0.0104],
555+
[ 0.0655, 0.0217, 0.0122],
556+
[ 0.0490, 0.1638, 0.2053],
557+
[ 0.0932, 0.0829, 0.0650],
558+
[-0.0186, -0.0209, -0.0135],
559+
[-0.0080, -0.0076, -0.0148],
560+
[-0.0284, -0.0201, 0.0011],
561+
[-0.0642, -0.0294, -0.0777],
562+
[-0.0035, 0.0076, -0.0140],
563+
[ 0.0519, 0.0731, 0.0887],
564+
[-0.0102, 0.0095, 0.0704],
565+
[ 0.0068, 0.0218, -0.0023],
566+
[-0.0726, -0.0486, -0.0519],
567+
[ 0.0260, 0.0295, 0.0263],
568+
[ 0.0250, 0.0333, 0.0341],
569+
[ 0.0168, -0.0120, -0.0174],
570+
[ 0.0226, 0.1037, 0.0114],
571+
[ 0.2577, 0.1906, 0.1604],
572+
[-0.0646, -0.0137, -0.0018],
573+
[-0.0112, 0.0309, 0.0358],
574+
[-0.0347, 0.0146, -0.0481],
575+
[ 0.0234, 0.0179, 0.0201],
576+
[ 0.0157, 0.0313, 0.0225],
577+
[ 0.0423, 0.0675, 0.0524],
578+
[-0.0031, 0.0027, -0.0255],
579+
[ 0.0447, 0.0555, 0.0330],
580+
[-0.0152, 0.0103, 0.0299],
581+
[-0.0755, -0.0489, -0.0635],
582+
[ 0.0853, 0.0788, 0.1017],
583+
[-0.0272, -0.0294, -0.0471],
584+
[ 0.0440, 0.0400, -0.0137],
585+
[ 0.0335, 0.0317, -0.0036],
586+
[-0.0344, -0.0621, -0.0984],
587+
[-0.0127, -0.0630, -0.0620],
588+
[-0.0648, 0.0360, 0.0924],
589+
[-0.0781, -0.0801, -0.0409],
590+
[ 0.0363, 0.0613, 0.0499],
591+
[ 0.0238, 0.0034, 0.0041],
592+
[-0.0135, 0.0258, 0.0310],
593+
[ 0.0614, 0.1086, 0.0589],
594+
[ 0.0428, 0.0350, 0.0205],
595+
[ 0.0153, 0.0173, -0.0018],
596+
[-0.0288, -0.0455, -0.0091],
597+
[ 0.0344, 0.0109, -0.0157],
598+
[-0.0205, -0.0247, -0.0187],
599+
[ 0.0487, 0.0126, 0.0064],
600+
[-0.0220, -0.0013, 0.0074],
601+
[-0.0203, -0.0094, -0.0048],
602+
[-0.0719, 0.0429, -0.0442],
603+
[ 0.1042, 0.0497, 0.0356],
604+
[-0.0659, -0.0578, -0.0280],
605+
[-0.0060, -0.0322, -0.0234]]
606+
607+
latent_rgb_factors_bias = [0.0007, -0.0256, -0.0206]
608+
541609
class Hunyuan3Dv2(LatentFormat):
542610
latent_channels = 64
543611
latent_dimensions = 1

0 commit comments

Comments
 (0)