Diffusers documentation has some error code,i have fixed it
原文：input = noise

for t in scheduler.timesteps:
    with torch.no_grad():
        noisy_residual = model(input, t).sample
previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
input = previous_noisy_sample我修改后的：input = noise

for t in scheduler.timesteps:
    with torch.no_grad():
        noisy_residual = model(input, t).sample
        previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
        input = previous_noisy_sample原文：from PIL import Image
import numpy as np

image = (input / 2 + 0.5).clamp(0, 1)
image = image.cpu().permute(0, 2, 3, 1).numpy()[0]
image = Image.fromarray((image * 255)).round().astype("uint8")
image我修改后的：from PIL import Image
import numpy as np

image = (input / 2 + 0.5).clamp(0, 1)
image = image.cpu().permute(0, 2, 3, 1).numpy()[0]
image = Image.fromarray((image * 255).round().astype(np.uint8))
image
2023-05-26T04:00:05Z
hi@waterplants, thanks for the feedback, would you like to send us PR fixing the docs? heregithub.comdiffusers/docs/source/en/using-diffusers at main · huggingface/diffusersmain/docs/source/en/using-diffusers🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorchThanks