NVIDIA / NVIDIA/Model-Optimizer

the error for quantize.py

Open
#212 1 comment 0 reactions 1 assignee View on GitHub

@jingyu-ml is already working on this.

Since Jul 1, 2025.

bug investigating model support torch.quantization
Dominant language
Python
Stars
3.8k
Forks
604
Avg merge
2d 8h
Merged PRs (30d)
142

Description

Image

I ran this command:

export MODEL_NAME=sdxl-turbo
export MODEL_PATH=/tmo/data/sdxl-turbo
mkdir /onnxdir
export ONNX_DIR=/onnxdir

python quantize.py --model sdxl-turbo --override-model-path ${MODEL_PATH} --format fp4 --batch-size 1 --calib-size 8 --quant-level 1.0 --n-steps 10 --model-dtype BFloat16 --trt-high-precision-dtype BFloat16 --quantized-torch-ckpt-save-path ./${MODEL_NAME}.pt --collect-method default --onnx-dir ${ONNX_DIR}

but get that error, How should I solve this error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.