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

Method forward

diffsynth/models/sdxl_text_encoder.py:30–37  ·  view source on GitHub ↗
(self, input_ids, clip_skip=1)

Source from the content-addressed store, hash-verified

28 return mask
29
30 def forward(self, input_ids, clip_skip=1):
31 embeds = self.token_embedding(input_ids) + self.position_embeds
32 attn_mask = self.attn_mask.to(device=embeds.device, dtype=embeds.dtype)
33 for encoder_id, encoder in enumerate(self.encoders):
34 embeds = encoder(embeds, attn_mask=attn_mask)
35 if encoder_id + clip_skip == len(self.encoders):
36 break
37 return embeds
38
39 @staticmethod
40 def state_dict_converter():

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected