d 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.FloatTensor] = None
negative_prompt_embeds: typing.Optional[torch.FloatTensor] = None
clean_caption: bool = False

)


Parameters 

prompt (str or List[str], option