fixed a bug
This commit is contained in:
@@ -166,6 +166,13 @@ class VideoCleaner:
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
# 设置多进程启动方法为 'spawn',这在 CUDA 环境下更安全,能避免显存冲突
|
||||
import multiprocessing
|
||||
try:
|
||||
multiprocessing.set_start_method('spawn', force=True)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("dir", help="Target directory")
|
||||
parser.add_argument("--days", type=int, default=30)
|
||||
|
||||
Reference in New Issue
Block a user