s
from DiffusionPipeline in a pipeline.py file.
Make sure that the whole pipeline is encapsulated within a single class and that the pipeline.py file
has only one such class.
Let’s quickly define an example pipeline.


	Copied
import torch
from diffusers import DiffusionPipeline


class MyPipeline(DiffusionPipeline):
    def __init__(self, unet, scheduler):
        super().__init__()

    self.register_modules(unet=unet, scheduler=scheduler)

 