[Feature] support SP for FLUX.2-dev (#3244)

This commit is contained in:
JohnJan authored and GitHub committed 2026-05-27 20:43:02 +08:00
1 parent 9abf9545df
commit 36dc32ff81
4 files changed
+277 -48

No files matched your search

@@ -398,7 +398,9 @@ class Flux2Pipeline(nn.Module, CFGParallelMixin, SupportImageInput, ProgressBarM
self._execution_device
)
transformer_kwargs = get_transformer_config_kwargs(od_config.tf_model_config, Flux2Transformer2DModel)
self.transformer = Flux2Transformer2DModel(quant_config=od_config.quantization_config, **transformer_kwargs)
self.transformer = Flux2Transformer2DModel(
quant_config=od_config.quantization_config, od_config=od_config, **transformer_kwargs
)
self.vae_scale_factor = 2 ** (len(self.vae.config.block_out_channels) - 1) if getattr(self, "vae", None) else 8
self.image_processor = Flux2ImageProcessor(vae_scale_factor=self.vae_scale_factor * 2)