).to("cuda") You can also use the from_single_file() method to load a model checkpoint stored in a single file format (.ckpt or .safetensors) from the Hub or locally:   Copied from diffusers import StableDiffusionXLPipeline, StableDiffusionXLImg2ImgPipeline