huggingface / huggingface/diffusers

[SD3] Incorrect stochastic sampling implementation

Abierto
#8,549 5 comentarios 0 reacciones 0 asignados Ver en GitHub
bug stale
Lenguaje dominante
Python
Estrellas
34.5k
Forks
7.3k
Merge medio
3 d 3 h
PR fusionados (30 d)
91

Descripción

### Describe the bug

Ref to Algorithm 2 of [EDM](https://arxiv.org/abs/2206.00364), for a given sample $x_t$, noise is introduced to it reaching a higher noise level $\hat{t}$, then we evaluate network with $\hat{x_t}$, $\hat{t}$ as input. However, the current implementation evaluates network with $x_t$, $t$ as input, which is inconsistent from definition.

Current implementation is more similar with Euler-Maruyama in spirit, "One can interpret Euler–Maruyama as first adding
noise and then performing an ODE step, not from the intermediate state after noise injection, but
assuming that $x$ and $\sigma$ remained at the initial state at the beginning of the iteration step." quote from [EDM](https://arxiv.org/abs/2206.00364)

### Reproduction

no

### Logs

_No response_

### System Info

no

### Who can help?

@yiyixuxu @sayakpaul

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

No file, test, or entry point is named. Start by locating the stochastic sampling implementation and compare its network inputs with Algorithm 2 of the linked EDM paper, focusing on whether the noise-adjusted sample and noise level are evaluated. Done means the implementation follows that algorithm and has coverage demonstrating the corrected inputs.

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

Evaluación

Stack tecnológico
python, pytorch
Área
machine-learning
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.