torch._inductor.config.use_mixed_mm = True Certain linear layers in the UNet and VAE don’t benefit from dynamic int8 quantization. You can filter out those layers with the dynamic_quant_filter_fn shown below.   Copied def dynamic_quant_filter_fn(mod, *args):