m_pretrained() method takes care of returning the correct pipeline class instance by: Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object Find the image-to-image pipeline linked to the pipeline class using pattern matching on pipeline class
name. If a controlnet argument is passed, it will instantiate a StableDiffusionControlNetImg2ImgPipeline
object. The pipeline is set in evaluation