refactor: update quantization schemes to use 'Default' values across configuration files for consistency

This commit is contained in:
gaclove
2025-10-21 17:36:54 +08:00
parent bc9b43c89c
commit feec05e608
3 changed files with 14 additions and 14 deletions
+8 -8
View File
@@ -85,10 +85,10 @@ class LightX2VDefaultConfig:
DEFAULT_ATTENTION_TYPE = "flash_attn3"
DEFAULT_QUANTIZATION_SCHEMES = {
"dit": "bf16",
"t5": "bf16",
"clip": "fp16",
"adapter": "bf16",
"dit": "Default",
"t5": "Default",
"clip": "Default",
"adapter": "Default",
}
DEFAULT_VIDEO_PARAMS = {
"height": 480,
@@ -385,13 +385,13 @@ class ModularConfigManager:
updates.update(
{
"clip_quantized": clip_scheme != "none",
"clip_quantized": clip_scheme != "Default",
"clip_quant_scheme": clip_scheme,
"t5_quantized": t5_scheme != "none",
"t5_quantized": t5_scheme != "Default",
"t5_quant_scheme": t5_scheme,
"dit_quantized": dit_scheme != "none",
"dit_quantized": dit_scheme != "Default",
"dit_quant_scheme": dit_scheme,
"adapter_quantized": adapter_scheme != "none",
"adapter_quantized": adapter_scheme != "Default",
"adapter_quant_scheme": adapter_scheme,
}
)
+4 -4
View File
@@ -95,10 +95,10 @@ class TeaCacheConfig:
class QuantizationConfig:
"""Quantization configuration."""
dit_quant_scheme: str = "fp8-sgl"
t5_quant_scheme: str = "fp8-sgl"
clip_quant_scheme: str = "fp8-sgl"
adapter_quant_scheme: str = "fp8-sgl"
dit_quant_scheme: str = "Default"
t5_quant_scheme: str = "Default"
clip_quant_scheme: str = "Default"
adapter_quant_scheme: str = "Default"
def to_dict(self) -> Dict[str, Any]:
return {
+2 -2
View File
@@ -305,7 +305,7 @@ class LightX2VQuantization:
quant_backends.append(op_name)
common_schema = ["fp8", "int8"]
supported_quant_schemes = ["none"]
supported_quant_schemes = ["Default"]
for schema in common_schema:
for backend in quant_backends:
supported_quant_schemes.append(f"{schema}-{backend}")
@@ -329,7 +329,7 @@ class LightX2VQuantization:
"clip_quant_scheme": (
supported_quant_schemes,
{
"default": supported_quant_schemes[1],
"default": supported_quant_schemes[0],
"tooltip": "CLIP encoder quantization precision",
},
),