[AutoRound] Support WAN2.2 W4A16 quantization model (#3353)
Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: hyh_hh <huyinghong1@huawei.com> Co-authored-by: hxhhhlalala <hyh_hh@163.com> Co-authored-by: hyh_hh <huyinghong1@huawei.com>
This commit is contained in:
9 files changed
+680
-8
No files matched your search
@@ -122,8 +122,7 @@ def load_transformer_config(model_path: str, subfolder: str = "transformer", loc
|
||||
|
||||
|
||||
def create_transformer_from_config(
|
||||
config: dict,
|
||||
quant_config: QuantizationConfig | None = None,
|
||||
config: dict, quant_config: QuantizationConfig | None = None, prefix: str = ""
|
||||
) -> WanTransformer3DModel:
|
||||
"""Create WanTransformer3DModel from config dict."""
|
||||
kwargs: dict = {}
|
||||
@@ -166,6 +165,8 @@ def create_transformer_from_config(
|
||||
|
||||
if quant_config is not None:
|
||||
kwargs["quant_config"] = quant_config
|
||||
if prefix:
|
||||
kwargs["prefix"] = prefix
|
||||
|
||||
return WanTransformer3DModel(**kwargs)
|
||||
|
||||
|
||||
Reference in new issue
Block a user