MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / pad

Function pad

cldm/hack.py:50–51  ·  view source on GitHub ↗
(x, p, i)

Source from the content-addressed store, hash-verified

48 return x[75 * 0: 75 * 1], x[75 * 1: 75 * 2], x[75 * 2: 75 * 3]
49
50 def pad(x, p, i):
51 return x[:i] if len(x) >= i else x + [p] * (i - len(x))
52
53 raw_tokens_list = tokenize(text)
54 tokens_list = []

Callers 1

_hacked_clip_forwardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected