MCPcopy
hub / github.com/deep-floyd/IF / text_preprocessing

Method text_preprocessing

deepfloyd_if/modules/t5.py:102–109  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

100 return text_encoder_embs
101
102 def text_preprocessing(self, text):
103 if self.use_text_preprocessing:
104 # The exact text cleaning as was in the training stage:
105 text = self.clean_caption(text)
106 text = self.clean_caption(text)
107 return text
108 else:
109 return text.lower().strip()
110
111 @staticmethod
112 def basic_clean(text):

Callers 1

get_text_embeddingsMethod · 0.95

Calls 1

clean_captionMethod · 0.95

Tested by

no test coverage detected