MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / encode_prompt

Method encode_prompt

diffsynth/pipelines/step_video.py:135–140  ·  view source on GitHub ↗
(self, prompt, positive=True)

Source from the content-addressed store, hash-verified

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):

Callers 1

__call__Method · 0.95

Calls 1

toMethod · 0.45

Tested by

no test coverage detected