MCPcopy
hub / github.com/CiaraStrawberry/TemporalKit / split_into_batches

Function split_into_batches

scripts/Berry_Method.py:31–38  ·  view source on GitHub ↗
(frames, batch_size, max_batches)

Source from the content-addressed store, hash-verified

29check_edges = False
30
31def split_into_batches(frames, batch_size, max_batches):
32 groups = [frames[i:i+batch_size] for i in range(0, len(frames), batch_size)][:max_batches]
33
34 # Add any remaining images to the last group
35 if len(frames) > max_batches * batch_size:
36 groups[-1] += frames[max_batches*batch_size:]
37
38 return groups
39
40def create_square_texture(frames, max_size, side_length=3):
41

Callers 3

process_videoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected