l models to CPU using accelerate, significantly reducing memory usage. When called, the pipeline’s
models have their state dicts saved to CPU and then are moved to a torch.device('meta') and loaded to GPU only when their specific submodule has its forward` method called.

encode_prompt

<
source
>
(
prompt
do_classifier_free_guidance = True
num_images_per_prompt = 1
device = None
negative_prompt = None
prompt_embeds: typing.Optional[torch.Float