()
unet = UNet2DModel()

pipeline = UnetSchedulerOneForwardPipeline(unet=unet, scheduler=scheduler)

output = pipeline()
But what’s even better is you can load pre-existing weights into the pipeline if the pipeline structure is identical. For example, you can load the google/ddpm-cifar10-32 weights into the one-step pipeline:


	Copied
pipeline = UnetSchedulerOneForwardPipeline.from_pretrained("google/ddpm-cifar10-32")

output = pipeline()

Sha