| 133 | |
| 134 | |
| 135 | def encode_prompt(self, prompt, positive=True): |
| 136 | clip_embeds, llm_embeds, llm_mask = self.prompter.encode_prompt(prompt, device=self.device, positive=positive) |
| 137 | clip_embeds = clip_embeds.to(dtype=self.torch_dtype, device=self.device) |
| 138 | llm_embeds = llm_embeds.to(dtype=self.torch_dtype, device=self.device) |
| 139 | llm_mask = llm_mask.to(dtype=self.torch_dtype, device=self.device) |
| 140 | return {"encoder_hidden_states_2": clip_embeds, "encoder_hidden_states": llm_embeds, "encoder_attention_mask": llm_mask} |
| 141 | |
| 142 | |
| 143 | def tensor2video(self, frames): |