EulerDiscreteScheduler returns incorrect v-prediction targets for discrete timesteps
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- machine-learning
Línea de trabajo
Lee EulerDiscreteScheduler.get_velocity y compara su búsqueda del timestep con la de DDIMScheduler.get_velocity. Ejecuta la reproducción proporcionada para confirmar la discrepancia en los timesteps discretos 999 y 500. El trabajo estará terminado cuando ambos schedulers devuelvan los mismos objetivos de velocidad para los mismos betas y entradas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I found this while reading EulerDiscreteScheduler.get_velocity. It looks up each timestep's position in the descending schedule and uses that position to index alphas_cumprod. At timestep 999 the default schedule reads alphas_cumprod[0]. I plan to fix the lookup to use the discrete training timestep value.
Reproduction
import torch
from diffusers import DDIMScheduler, EulerDiscreteScheduler
config = {
"beta_start": 0.00085,
"beta_end": 0.012,
"beta_schedule": "scaled_linear",
"prediction_type": "v_prediction",
}
sample = torch.tensor([[1.0, -2.0], [0.5, 3.0]])
noise = torch.tensor([[0.25, 0.5], [-0.75, 1.0]])
timesteps = torch.tensor([999.0, 500.0])
actual = EulerDiscreteScheduler(**config).get_velocity(sample, noise, timesteps)
expected = DDIMScheduler(**config).get_velocity(sample, noise, timesteps.long())
print((actual - expected).abs().max().item())
I get 1.4713691473007202. Both schedulers have the same betas, so the velocity targets should agree.
Context
The SDXL T2I-Adapter training script uses this result as its loss target when the scheduler is configured for v_prediction. I reproduced the mismatch at the scheduler call on CPU with synthetic inputs.
System Info
Diffusers 0.44.0.dev0 at 08d5de3, Python 3.14.5, PyTorch 2.15.0+cpu, Linux x86_64. Single process on CPU.
- Lenguaje dominante
- Python
- Estrellas
- 35k
- Forks
- 7.5k
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de huggingface/diffusers
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
huggingface/diffusers#15463 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
huggingface/diffusers#15460 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/diffusers#15459 ·
Los mantenedores suelen responder en 1 día
-
GlmImagePipeline: image-to-image fails with `enable_model_cpu_offload()` (device mismatch in `get_image_features`)Posiblemente ocupada @saeekailas la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
huggingface/diffusers#15449 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
huggingface/diffusers#15436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de huggingface/diffusers
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
daniel-ospina/tortoise#15014 ·
Los mantenedores suelen responder en 1 día
-
area:api p2 product:business triage:active type:feat
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cuadrao-ai/argus#2656 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
good first issue tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
yeab7505/tenasig#20 · 1 comentario ·
Los mantenedores suelen responder en 1 día