[Diffusion][Quantization] Enable MiniMax-H3 global FP8 with DLO (#5910)
Signed-off-by: lishunyang12 <lishunyang12@163.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
09b6a1604a
commit
d1e230c95b
18 files changed
+833
-165
No files matched your search
@@ -29,6 +29,21 @@ if TYPE_CHECKING:
|
||||
PRE_QUANTIZED_METHODS: frozenset[str] = frozenset({"modelopt", "modelopt_fp4", "modelopt_mxfp8", "modelopt_mixed"})
|
||||
|
||||
|
||||
def resolve_component_quant_config(
|
||||
quant_config: QuantizationConfig | None,
|
||||
component: str,
|
||||
) -> QuantizationConfig | None:
|
||||
"""Resolve one pipeline component from a global or component config.
|
||||
|
||||
A plain config is global and therefore applies unchanged to every
|
||||
quantization-aware component. Only ``ComponentQuantizationConfig`` narrows
|
||||
the scope through its explicit prefix map.
|
||||
"""
|
||||
if isinstance(quant_config, ComponentQuantizationConfig):
|
||||
return quant_config.resolve(component)
|
||||
return quant_config
|
||||
|
||||
|
||||
def resolve_encoder_quant_config(
|
||||
quant_config: QuantizationConfig | None,
|
||||
) -> QuantizationConfig | None:
|
||||
|
||||
Reference in new issue
Block a user