MCPcopy Create free account
hub / github.com/KlingAIResearch/ReCamMaster / forward

Method forward

diffsynth/models/sd_text_encoder.py:64–72  ·  view source on GitHub ↗
(self, input_ids, clip_skip=1)

Source from the content-addressed store, hash-verified

62 return mask
63
64 def forward(self, input_ids, clip_skip=1):
65 embeds = self.token_embedding(input_ids) + self.position_embeds
66 attn_mask = self.attn_mask.to(device=embeds.device, dtype=embeds.dtype)
67 for encoder_id, encoder in enumerate(self.encoders):
68 embeds = encoder(embeds, attn_mask=attn_mask)
69 if encoder_id + clip_skip == len(self.encoders):
70 break
71 embeds = self.final_layer_norm(embeds)
72 return embeds
73
74 @staticmethod
75 def state_dict_converter():

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected