MCPcopy
hub / github.com/Wan-Video/Wan2.2 / inputs_padding

Method inputs_padding

wan/animate.py:201–213  ·  view source on GitHub ↗
(self, array, target_len)

Source from the content-addressed store, hash-verified

199 return model
200
201 def inputs_padding(self, array, target_len):
202 idx = 0
203 flip = False
204 target_array = []
205 while len(target_array) < target_len:
206 target_array.append(deepcopy(array[idx]))
207 if flip:
208 idx -= 1
209 else:
210 idx += 1
211 if idx == 0 or idx == len(array) - 1:
212 flip = not flip
213 return target_array[:target_len]
214
215 def get_valid_len(self, real_len, clip_len=81, overlap=1):
216 real_clip_len = clip_len - overlap

Callers 1

generateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected