huggingface / huggingface/diffusers
Implementation error of v_prediction in eulara and eular
- Langage dominant
- Python
- Étoiles
- 34.5k
- Forks
- 7.3k
- Merge moyen
- 3 j 3 h
- PR mergées (30 j)
- 91
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Localiser l’implémentation du scheduler Euler et le calcul de pred_original_sample. Vérifier la substitution signalée pour sigma par rapport à l’expression DDIM et à la convention de prédiction du scheduler. La tâche est terminée lorsqu’il a été déterminé si la racine carrée manque, et que l’implémentation a été documentée ou corrigée en conséquence.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- machine-learning
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100