Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

AutoRound: user-passed quantization_config silently overwrites checkpoint's quant settings

Abierto
#15,120 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@OnePunchMonk ya está trabajando en esto.

Desde el 24/10/2026.

  • #15121 de @OnePunchMonk — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python, pytorch

Línea de trabajo

Read src/diffusers/quantizers/auto.py and inspect DiffusersAutoQuantizer.merge_quantization_configs; the reproduction in the issue shows how to trigger the overwrite. Check existing quantizer tests for coverage of merging checkpoint settings with runtime overrides, then verify that only the requested backend changes while checkpoint values such as group_size and sym remain intact. An open linked pull request already addresses this issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug

DiffusersAutoQuantizer.merge_quantization_configs (in src/diffusers/quantizers/auto.py) is supposed to let users override runtime-only fields like backend on an AutoRoundConfig while keeping the checkpoint's own quantization settings. Instead, it loops over every field in the user-supplied AutoRoundConfig.__dict__ and overrides any field that differs from the checkpoint's value, not just backend.

The documented call is AutoRoundConfig(backend="auto"). That object still carries the dataclass defaults bits=4, group_size=128, sym=True. So loading a checkpoint that was quantized with, say, group_size=32 silently rewrites it to group_size=128 before convert_hf_model reads it — producing a shape mismatch at best, wrong (dequantized-as-the-wrong-grouping) outputs at worst.

Reproduction
from diffusers.quantizers.auto import DiffusersAutoQuantizer
from diffusers.quantizers.quantization_config import AutoRoundConfig

# Simulates the checkpoint's own config.json quantization_config
checkpoint_config = AutoRoundConfig(bits=4, group_size=32, sym=False, backend="torch")

# The documented way to override just the runtime backend
args_config = AutoRoundConfig(backend="auto")

merged = DiffusersAutoQuantizer.merge_quantization_configs(checkpoint_config, args_config)

print(merged.backend)     # "auto" - expected
print(merged.group_size)  # 128  <- should be 32, the checkpoint's own value
print(merged.sym)         # True <- should be False, the checkpoint's own value
System Info
  • diffusers @ main, commit aaf57d0
  • Python 3.12, Linux
Who can help?

@sayakpaul

Lenguaje dominante
Python
Estrellas
34.8k
Forks
7.4k
Merge medio
2 d 7 h
PR fusionados (30 d)
54

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de huggingface/diffusers

Todos los issues de huggingface/diffusers

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.