summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/clip/tokenizer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/clip/tokenizer.py b/models/clip/tokenizer.py
index fbfe790..256d442 100644
--- a/models/clip/tokenizer.py
+++ b/models/clip/tokenizer.py
@@ -47,8 +47,9 @@ class MultiCLIPTokenizer(CLIPTokenizer):
47 tokens = self.token_map[id] 47 tokens = self.token_map[id]
48 48
49 if vector_shuffle: 49 if vector_shuffle:
50 tokens = copy.copy(tokens) 50 subtokens = tokens[1:-1]
51 np.random.shuffle(tokens) 51 np.random.shuffle(subtokens)
52 tokens = tokens[:1] + subtokens + tokens[-1:]
52 53
53 return tokens 54 return tokens
54 else: 55 else: