@@ -6,6 +6,7 @@ class LatentFormat:
66 latent_dimensions = 2
77 latent_rgb_factors = None
88 latent_rgb_factors_bias = None
9+ latent_rgb_factors_reshape = None
910 taesd_decoder_name = None
1011
1112 def process_in (self , latent ):
@@ -181,6 +182,45 @@ def process_out(self, latent):
181182class Flux2 (LatentFormat ):
182183 latent_channels = 128
183184
185+ def __init__ (self ):
186+ self .latent_rgb_factors = [
187+ [0.0058 , 0.0113 , 0.0073 ],
188+ [0.0495 , 0.0443 , 0.0836 ],
189+ [- 0.0099 , 0.0096 , 0.0644 ],
190+ [0.2144 , 0.3009 , 0.3652 ],
191+ [0.0166 , - 0.0039 , - 0.0054 ],
192+ [0.0157 , 0.0103 , - 0.0160 ],
193+ [- 0.0398 , 0.0902 , - 0.0235 ],
194+ [- 0.0052 , 0.0095 , 0.0109 ],
195+ [- 0.3527 , - 0.2712 , - 0.1666 ],
196+ [- 0.0301 , - 0.0356 , - 0.0180 ],
197+ [- 0.0107 , 0.0078 , 0.0013 ],
198+ [0.0746 , 0.0090 , - 0.0941 ],
199+ [0.0156 , 0.0169 , 0.0070 ],
200+ [- 0.0034 , - 0.0040 , - 0.0114 ],
201+ [0.0032 , 0.0181 , 0.0080 ],
202+ [- 0.0939 , - 0.0008 , 0.0186 ],
203+ [0.0018 , 0.0043 , 0.0104 ],
204+ [0.0284 , 0.0056 , - 0.0127 ],
205+ [- 0.0024 , - 0.0022 , - 0.0030 ],
206+ [0.1207 , - 0.0026 , 0.0065 ],
207+ [0.0128 , 0.0101 , 0.0142 ],
208+ [0.0137 , - 0.0072 , - 0.0007 ],
209+ [0.0095 , 0.0092 , - 0.0059 ],
210+ [0.0000 , - 0.0077 , - 0.0049 ],
211+ [- 0.0465 , - 0.0204 , - 0.0312 ],
212+ [0.0095 , 0.0012 , - 0.0066 ],
213+ [0.0290 , - 0.0034 , 0.0025 ],
214+ [0.0220 , 0.0169 , - 0.0048 ],
215+ [- 0.0332 , - 0.0457 , - 0.0468 ],
216+ [- 0.0085 , 0.0389 , 0.0609 ],
217+ [- 0.0076 , 0.0003 , - 0.0043 ],
218+ [- 0.0111 , - 0.0460 , - 0.0614 ],
219+ ]
220+
221+ self .latent_rgb_factors_bias = [- 0.0329 , - 0.0718 , - 0.0851 ]
222+ self .latent_rgb_factors_reshape = lambda t : t .reshape (t .shape [0 ], 32 , 2 , 2 , t .shape [- 2 ], t .shape [- 1 ]).permute (0 , 1 , 4 , 2 , 5 , 3 ).reshape (t .shape [0 ], 32 , t .shape [- 2 ] * 2 , t .shape [- 1 ] * 2 )
223+
184224 def process_in (self , latent ):
185225 return latent
186226
0 commit comments