Using SDXL
We briefly covered loading the SDXL model in Chapter 6 and SDXL ControlNet usage in Chapter 13. You can find the sample codes there. In this section, we will cover more common SDXL usages, including loading community-shared SDXL models and how to use the image-to-image pipeline to enhance the model, using SDXL with community-shared LoRA models, and the unlimited length prompt pipeline from Diffuser (provided by the author of this book).
Use SDXL community models
Just months after the release of SDXL, the open source community has released countless fine-tuned SDXL models based on the base model from Stability AI. We can find these models on Hugging Face and CIVITAI (https://civitai.com/), and the number keeps growing.
Here, let’s load one model from HuggingFace, using the SDXL model ID:
import torch from diffusers import StableDiffusionXLPipeline base_pipe = StableDiffusionXLPipeline.from_pretrained( Â Â Â Â "RunDiffusion/RunDiffusion...