chenwr727 / KLing-Video-WatermarkRemover-Enhancer

KLing-Video-WatermarkRemover-Enhancer is an open-source tool developed to enhance and clean up videos generated by KLing. This project is designed to automatically remove watermarks from videos and apply advanced enhancement algorithms, improving the overall visual quality.
2 stars 0 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './weights/sttn.pth' #2

Closed xPartners closed 1 week ago

xPartners commented 1 week ago

Nearly a success, however, still faced an error difficult to settle it, kindly advise

2024-09-07 00:46:56: Start! E:\demo.mp4 2024-09-07 00:46:56: Source: extracting frames with 30.0 FPS... 2024-09-07 00:47:04: Erase: removing watermark... Set Mask: 100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 153/153 [00:00<00:00, 962.34it/s] Traceback (most recent call last): File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 93, in main() File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 90, in main process_input(args.input, args.remove_watermark, args.enhance_video) File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 68, in process_input process_video( File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 36, in process_video remove_watermark(frame_paths, config) File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\erase.py", line 145, in remove_watermark results = inpaint_video( File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\erase.py", line 37, in inpaint_video model = build_sttn_model(ckpt_p, device) File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\sttn.py", line 53, in build_sttn_model data = torch.load(ckpt_p, map_location=device) File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 997, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 444, in _open_file_like return _open_file(name_orbuffer, mode) File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 425, in init super().init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './weights/sttn.pth'**_

chenwr727 commented 1 week ago

sttn.pth

I have updated the document, you can refer to it.

Configuration

The configuration file config.yaml defines the parameters for watermark removal.

xPartners commented 1 week ago

Thanks, It is fixed already, however, Im facing another issue with './weights/RealESRGAN_x2plus.pth'