huggingface / huggingface/diffusers

Implementation error of v_prediction in eulara and eular

Abierto
#7,046 7 comentarios 1 reacción 0 asignados Ver en GitHub
stale
Lenguaje dominante
Python
Estrellas
34.5k
Forks
7.3k
Merge medio
3 d 3 h
PR fusionados (30 d)
91

Descripción

I came across a potential inconsistency in the implementation of v_prediction within the Euler scheduler when examining the source code. Specifically, in the computation of pred_original_sample, the formula is given as:
`pred_original_sample = model_output * (-sigma / (sigma**2 + 1) ** 0.5) + (sample / (sigma**2 + 1))`
Where sigma is calculated as:
`sigmas = np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5)`
Substituting the definition of sigma into the equation for pred_original_sample, we arrive at:
`pred_original_sample = sample * alphas_cumprod - model_output * ((1-alphas_cumprod) ** 0.5)`
Here, it appears that `sample * alphas_cumprod` is missing a square root operation on `alphas_cumprod`. Shouldn't this be `sample * (alphas_cumprod**0.5)`? This seems to be an inconsistency, especially considering that in the DDIM scheduler as in
`(alpha_prod_t**0.5) * sample - (beta_prod_t**0.5) * model_output`.
Could this be an error?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Locate the Euler scheduler implementation and the computation of pred_original_sample. Check the reported substitution for sigma against the DDIM expression and the scheduler's prediction convention. Done means determining whether the square root is missing and documenting or correcting the implementation accordingly.

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

Evaluación

Stack tecnológico
python
Área
machine-learning
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.