te any diffusion system.
The last step is to convert the denoised output into an image:


	Copied
>>> 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
In the next section, you’ll put your skills to the test and breakdown the more complex Stable Diffusion pipeline. The steps ar