MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / natural_key

Function natural_key

examples/WanVSR/infer_flashvsr_tiny_long_video.py:22–23  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

20 return frames
21
22def natural_key(name: str):
23 return [int(t) if t.isdigit() else t.lower() for t in re.split(r'([0-9]+)', os.path.basename(name))]
24
25def list_images_natural(folder: str):
26 exts = ('.png', '.jpg', '.jpeg', '.PNG', '.JPG', '.JPEG')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected