Scheduled Prompt Parsing
In Chapter 10, we discussed how to unlock the 77-token prompt limitation and a solution to enable prompt weighting, which paved the way for this chapter. With the knowledge from Chapter 10, we can generate various kinds of images by leveraging the power of natural language and weighting formats. However, there are some limitations inherent in the out-of-the-box code from the Hugging Face Diffusers package.
For example, we cannot write a prompt to ask Stable Diffusion to generate a cat in the first five steps and then a dog in the next five steps. Similarly, we cannot write a prompt to ask Stable Diffusion to blend two concepts by alternately denoising the two concepts.
In this chapter, we will explore the two solutions in the following topics:
- Using the Compel package
- Building a custom scheduled prompt pipeline