(
model_output,
sample,
sigmas,
step_index,
)
| 261 | |
| 262 | |
| 263 | def convert_model_output( |
| 264 | model_output, |
| 265 | sample, |
| 266 | sigmas, |
| 267 | step_index, |
| 268 | ) -> torch.Tensor: |
| 269 | sigma_t = sigmas[step_index] |
| 270 | x0_pred = sample - sigma_t * model_output |
| 271 | |
| 272 | return x0_pred |
| 273 | |
| 274 | |
| 275 | def ddim_update( |