Skip to content

Fix --quantization fp8-scaled-mm CLI crash#169

Open
garrick99 wants to merge 1 commit intoLightricks:mainfrom
garrick99:fix/fp8-scaled-mm-cli-crash
Open

Fix --quantization fp8-scaled-mm CLI crash#169
garrick99 wants to merge 1 commit intoLightricks:mainfrom
garrick99:fix/fp8-scaled-mm-cli-crash

Conversation

@garrick99
Copy link

Summary

Fixes #146--quantization fp8-scaled-mm crashes with TypeError: QuantizationPolicy.fp8_scaled_mm() takes 1 positional argument but 2 were given.

Cause

args.py was passing amax_path to QuantizationPolicy.fp8_scaled_mm(), but the classmethod takes no arguments.

Fix

Match the pattern already used by fp8-cast: reject extra arguments and call without args.

 elif policy_name == "fp8-scaled-mm":
-    amax_path = resolve_path(values[1]) if len(values) > 1 else None
-    policy = QuantizationPolicy.fp8_scaled_mm(amax_path)
+    if len(values) > 1:
+        msg = f"{option_string} fp8-scaled-mm does not accept additional arguments"
+        raise argparse.ArgumentError(self, msg)
+    policy = QuantizationPolicy.fp8_scaled_mm()

🤖 Generated with Claude Code

QuantizationPolicy.fp8_scaled_mm() is a classmethod that takes no arguments,
but args.py was passing amax_path to it, causing:
  TypeError: QuantizationPolicy.fp8_scaled_mm() takes 1 positional argument but 2 were given

Match the pattern used by fp8-cast: reject extra arguments and call without args.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI --quantization fp8-scaled-mm crashes with TypeError

1 participant