Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

fix: forward pipeline call kwargs through diffusion entry (#2448)

Wang, Chang63895ebf6897
diff --git a/auto_round/autoround.py b/auto_round/autoround.py
index 8ffcc85a6..47cde36d6 100644
--- a/auto_round/autoround.py
+++ b/auto_round/autoround.py
@@ -252,6 +252,7 @@ _ENTRY_KWARG_OWNERS = {
"num_inference_steps": "diffusion",
"calib_num_inference_steps": "diffusion",
"generator_seed": "diffusion",
+ "pipeline_call_kwargs": "diffusion",
"diffusion_tuning_cache_size": "diffusion",
}
diff --git a/test/unit/common/core/test_entry_normalization.py b/test/unit/common/core/test_entry_normalization.py
index c8e560f0d..08a232d96 100644
--- a/test/unit/common/core/test_entry_normalization.py
+++ b/test/unit/common/core/test_entry_normalization.py
@@ -26,6 +26,12 @@ def test_diffusion_cache_cli_and_entry_routing(value, expected):
def test_split_entry_kwargs_partitions_owned_fields():
processor = object()
+ pipeline_call_kwargs = {
+ "height": 256,
+ "width": 256,
+ "num_frames": 9,
+ "output_type": "latent",
+ }
grouped = _split_entry_kwargs(
{
@@ -36,6 +42,7 @@ def test_split_entry_kwargs_partitions_owned_fields():
"num_inference_steps": 20,
"calib_num_inference_steps": 8,
"diffusion_tuning_cache_size": 2,
+ "pipeline_call_kwargs": pipeline_call_kwargs,
}
)
@@ -46,6 +53,7 @@ def test_split_entry_kwargs_partitions_owned_fields():
assert grouped["diffusion"]["num_inference_steps"] == 20
assert grouped["diffusion"]["calib_num_inference_steps"] == 8
assert grouped["diffusion"]["diffusion_tuning_cache_size"] == 2
+ assert grouped["diffusion"]["pipeline_call_kwargs"] == pipeline_call_kwargs
def test_split_entry_kwargs_ignores_unknown_fields(monkeypatch):