Skip to content

Commit

Permalink
nn: Disallow pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 20, 2024
1 parent 3cd82a4 commit 57b61ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lvsfunc/nn/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _process_frame(n: int, frame: vs.VideoFrame):
filename = f'{next_name:05d}.npy'
file_path = out_dir / filename

np.save(file_path, frame_data, allow_pickle=True)
np.save(file_path, frame_data, allow_pickle=False)

next_name += 1

Expand Down Expand Up @@ -181,15 +181,15 @@ def npy_to_clip(

file_paths = sorted(file_paths, key=lambda x: int(x.stem))

first_frame = np.load(file_paths[0], allow_pickle=True)[0]
first_frame = np.load(file_paths[0], allow_pickle=False)[0]
height, width = first_frame['Y'].shape

fmt = get_format_from_npy(first_frame)

blank_clip = core.std.BlankClip(None, width, height, fmt, length=len(file_paths), keep=True)

def _read_frame(n: int, f: vs.VideoFrame) -> vs.VideoNode:
loaded_frame = np.load(file_paths[n], allow_pickle=True)[0]
loaded_frame = np.load(file_paths[n], allow_pickle=False)[0]

fout = f.copy()

Expand Down

0 comments on commit 57b61ed

Please sign in to comment.