quired configuration and weight files (if not already done so), and finally returns a pipeline instance, called ldm.
The pipeline instance can then be called using LDMTextToImagePipeline.call() (i.e., ldm("image of a astronaut riding a horse")) for text-to-image generation.
Instead of using the generic DiffusionPipeline class for loading, you can also load the appropriate pipeline class directly. The code snippet above yields the same instance 