import torch
from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler
Function to create the pipeline
def create_pipeline(pipeline_type='text-to-image', scheduler=None, model_name=None):
"""Creates and returns a Stable Diffusion pipeline based on the specified type."""
import torch from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler
Function to create the pipeline
def create_pipeline(pipeline_type='text-to-image', scheduler=None, model_name=None): """Creates and returns a Stable Diffusion pipeline based on the specified type."""
Creating the SDXL pipeline
sdxl_t2i_pipe = create_pipeline('text-to-image', model_name='sdxl')