ComfyUI-DeepFuze icon indicating copy to clipboard operation
ComfyUI-DeepFuze copied to clipboard

ComfyUI_windows_portable\ComfyUI\output\deepfuze\faceswap_17342876531251123.mp4 could not be loaded with cv.

Open ABIA2024 opened this issue 1 year ago • 6 comments

exemple DeepFuzeFaceSwap le LOG File "D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 928, in faceswampgenerate return load_video_cv(faceswap_filename,0,'Disabled',512,512,0,0,1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 446, in load_video_cv (width, height, fps, duration, total_frames, target_frame_time) = next(gen) ^^^^^^^^^ File "D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 365, in cv_frame_generator raise ValueError(f"{video} could not be loaded with cv.") ValueError: D:\PINOKIO2\ComfyUI_windows_portable\ComfyUI\output\deepfuze\faceswap_17342877475469728.mp4 could not be loaded with cv.

Prompt executed in 4.11 seconds

ABIA2024 avatar Dec 15 '24 18:12 ABIA2024

CV Error: If you encounter the error "ComfyUI_windows_portable\ComfyUI\output\deepfuze\faceswap_file.mp4 could not be loaded with cv,"

getting following in cmd:

MichaelSingh7 avatar Dec 27 '24 14:12 MichaelSingh7

got prompt 1 48 video h265-mp4 {'enhancer': 'gfpgan_1.4', 'faceswap_model': 'inswapper_128', 'frame_enhancer': 'clear_reality_x4', 'face_detector_model': 'retinaface', 'reference_face_index': 0, 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'device': 'cuda', 'frame_rate': 24.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'source_images': ['20', 0], 'target_images': ['3', 0], 'format': 'video/h265-mp4', 'pix_fmt': 'yuv420p10le', 'crf': 22, 'save_metadata': ['save_metadata', 'BOOLEAN', {'default': True}]} C:\AI\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite\videohelpersuite..\video_formats\h265-mp4.json pix_fmt crf save_metadata Output images were not of valid resolution and have had padding applied ['python', './run.py', '--frame-processors', 'face_swapper', '-s', 'C:\AI\ComfyUI\output\deepfuze_00012_.png', '-t', 'C:\AI\ComfyUI\output\deepfuze_00012.mp4', '--face-detector-model', 'retinaface', '-o', 'C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4', '--face-swapper-model', 'inswapper_128', '--reference-face-position', '0', '--face-mask-padding', '0', '0', '0', '0', '--headless', '--execution-providers', 'cuda'] usage: run.py [-h] [-c CONFIG_PATH] [-s SOURCE_PATHS] [-t TARGET_PATH] [-o OUTPUT_PATH] [-v] [--force-download] [--skip-download] [--headless] [--log-level {error,warn,info,debug}] [--execution-device-id EXECUTION_DEVICE_ID] [--execution-providers EXECUTION_PROVIDERS [EXECUTION_PROVIDERS ...]] [--execution-thread-count [1-128]] [--execution-queue-count [1-32]] [--video-memory-strategy {strict,moderate,tolerant}] [--system-memory-limit [0-128]] [--face-analyser-order {left-right,right-left,top-bottom,bottom-top,small-large,large-small,best-worst,worst-best}] [--face-analyser-age {child,teen,adult,senior}] [--face-analyser-gender {female,male}] [--face-detector-model {many,retinaface,scrfd,yoloface,yunet}] [--face-detector-size FACE_DETECTOR_SIZE] [--face-detector-score [0.0-1.0]] [--face-landmarker-score [0.0-1.0]] [--face-selector-mode {many,one,reference}] [--reference-face-position REFERENCE_FACE_POSITION] [--reference-face-distance [0.0-1.5]] [--reference-frame-number REFERENCE_FRAME_NUMBER] [--face-mask-types FACE_MASK_TYPES [FACE_MASK_TYPES ...]] [--face-mask-blur [0.0-1.0]] [--face-mask-padding FACE_MASK_PADDING [FACE_MASK_PADDING ...]] [--face-mask-regions FACE_MASK_REGIONS [FACE_MASK_REGIONS ...]] [--trim-frame-start TRIM_FRAME_START] [--trim-frame-end TRIM_FRAME_END] [--temp-frame-format {bmp,jpg,png}] [--keep-temp] [--output-image-quality [0-100]] [--output-image-resolution OUTPUT_IMAGE_RESOLUTION] [--output-video-encoder {libx264,libx265,libvpx-vp9,h264_nvenc,hevc_nvenc,h264_amf,hevc_amf}] [--output-video-preset {ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow}] [--output-video-quality [0-100]] [--output-video-resolution OUTPUT_VIDEO_RESOLUTION] [--output-video-fps OUTPUT_VIDEO_FPS] [--skip-audio] [--frame-processors FRAME_PROCESSORS [FRAME_PROCESSORS ...]] [--face-debugger-items FACE_DEBUGGER_ITEMS [FACE_DEBUGGER_ITEMS ...]] [--face-enhancer-model {codeformer,gfpgan_1.2,gfpgan_1.3,gfpgan_1.4,gpen_bfr_256,gpen_bfr_512,gpen_bfr_1024,gpen_bfr_2048,restoreformer_plus_plus}] [--face-enhancer-blend [0-100]] [--face-swapper-model {blendswap_256,inswapper_128,inswapper_128_fp16,simswap_256,simswap_512_unofficial,uniface_256}] [--frame-colorizer-model {ddcolor,ddcolor_artistic,deoldify,deoldify_artistic,deoldify_stable}] [--frame-colorizer-blend [0-100]] [--frame-colorizer-size {192x192,256x256,384x384,512x512}] [--frame-enhancer-model {clear_reality_x4,lsdir_x4,nomos8k_sc_x4,real_esrgan_x2,real_esrgan_x2_fp16,real_esrgan_x4,real_esrgan_x4_fp16,real_hatgan_x4,span_kendata_x4,ultra_sharp_x4}] [--frame-enhancer-blend [0-100]] [--lip-syncer-model {wav2lip_gan}] [--open-browser] [--ui-layouts UI_LAYOUTS [UI_LAYOUTS ...]] run.py: error: argument --execution-providers: invalid choice: 'cuda' (choose from 'dml', 'cpu') ['python', './run.py', '--frame-processors', 'face_enhancer', '--face-enhancer-model', 'gfpgan_1.4', '-t', 'C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4', '-o', 'C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4', '--headless', '--execution-providers', 'cuda'] usage: run.py [-h] [-c CONFIG_PATH] [-s SOURCE_PATHS] [-t TARGET_PATH] [-o OUTPUT_PATH] [-v] [--force-download] [--skip-download] [--headless] [--log-level {error,warn,info,debug}] [--execution-device-id EXECUTION_DEVICE_ID] [--execution-providers EXECUTION_PROVIDERS [EXECUTION_PROVIDERS ...]] [--execution-thread-count [1-128]] [--execution-queue-count [1-32]] [--video-memory-strategy {strict,moderate,tolerant}] [--system-memory-limit [0-128]] [--face-analyser-order {left-right,right-left,top-bottom,bottom-top,small-large,large-small,best-worst,worst-best}] [--face-analyser-age {child,teen,adult,senior}] [--face-analyser-gender {female,male}] [--face-detector-model {many,retinaface,scrfd,yoloface,yunet}] [--face-detector-size FACE_DETECTOR_SIZE] [--face-detector-score [0.0-1.0]] [--face-landmarker-score [0.0-1.0]] [--face-selector-mode {many,one,reference}] [--reference-face-position REFERENCE_FACE_POSITION] [--reference-face-distance [0.0-1.5]] [--reference-frame-number REFERENCE_FRAME_NUMBER] [--face-mask-types FACE_MASK_TYPES [FACE_MASK_TYPES ...]] [--face-mask-blur [0.0-1.0]] [--face-mask-padding FACE_MASK_PADDING [FACE_MASK_PADDING ...]] [--face-mask-regions FACE_MASK_REGIONS [FACE_MASK_REGIONS ...]] [--trim-frame-start TRIM_FRAME_START] [--trim-frame-end TRIM_FRAME_END] [--temp-frame-format {bmp,jpg,png}] [--keep-temp] [--output-image-quality [0-100]] [--output-image-resolution OUTPUT_IMAGE_RESOLUTION] [--output-video-encoder {libx264,libx265,libvpx-vp9,h264_nvenc,hevc_nvenc,h264_amf,hevc_amf}] [--output-video-preset {ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow}] [--output-video-quality [0-100]] [--output-video-resolution OUTPUT_VIDEO_RESOLUTION] [--output-video-fps OUTPUT_VIDEO_FPS] [--skip-audio] [--frame-processors FRAME_PROCESSORS [FRAME_PROCESSORS ...]] [--face-debugger-items FACE_DEBUGGER_ITEMS [FACE_DEBUGGER_ITEMS ...]] [--face-enhancer-model {codeformer,gfpgan_1.2,gfpgan_1.3,gfpgan_1.4,gpen_bfr_256,gpen_bfr_512,gpen_bfr_1024,gpen_bfr_2048,restoreformer_plus_plus}] [--face-enhancer-blend [0-100]] [--face-swapper-model {blendswap_256,inswapper_128,inswapper_128_fp16,simswap_256,simswap_512_unofficial,uniface_256}] [--frame-colorizer-model {ddcolor,ddcolor_artistic,deoldify,deoldify_artistic,deoldify_stable}] [--frame-colorizer-blend [0-100]] [--frame-colorizer-size {192x192,256x256,384x384,512x512}] [--frame-enhancer-model {clear_reality_x4,lsdir_x4,nomos8k_sc_x4,real_esrgan_x2,real_esrgan_x2_fp16,real_esrgan_x4,real_esrgan_x4_fp16,real_hatgan_x4,span_kendata_x4,ultra_sharp_x4}] [--frame-enhancer-blend [0-100]] [--lip-syncer-model {wav2lip_gan}] [--open-browser] [--ui-layouts UI_LAYOUTS [UI_LAYOUTS ...]] run.py: error: argument --execution-providers: invalid choice: 'cuda' (choose from 'dml', 'cpu') ['python', './run.py', '--frame-processors', 'frame_enhancer', '--frame-enhancer-model', 'clear_reality_x4', '-t', 'C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4', '-o', 'C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4', '--headless'] usage: run.py [-h] [-c CONFIG_PATH] [-s SOURCE_PATHS] [-t TARGET_PATH] [-o OUTPUT_PATH] [-v] [--force-download] [--skip-download] [--headless] [--log-level {error,warn,info,debug}] [--execution-device-id EXECUTION_DEVICE_ID] [--execution-providers EXECUTION_PROVIDERS [EXECUTION_PROVIDERS ...]] [--execution-thread-count [1-128]] [--execution-queue-count [1-32]] [--video-memory-strategy {strict,moderate,tolerant}] [--system-memory-limit [0-128]] [--face-analyser-order {left-right,right-left,top-bottom,bottom-top,small-large,large-small,best-worst,worst-best}] [--face-analyser-age {child,teen,adult,senior}] [--face-analyser-gender {female,male}] [--face-detector-model {many,retinaface,scrfd,yoloface,yunet}] [--face-detector-size FACE_DETECTOR_SIZE] [--face-detector-score [0.0-1.0]] [--face-landmarker-score [0.0-1.0]] [--face-selector-mode {many,one,reference}] [--reference-face-position REFERENCE_FACE_POSITION] [--reference-face-distance [0.0-1.5]] [--reference-frame-number REFERENCE_FRAME_NUMBER] [--face-mask-types FACE_MASK_TYPES [FACE_MASK_TYPES ...]] [--face-mask-blur [0.0-1.0]] [--face-mask-padding FACE_MASK_PADDING [FACE_MASK_PADDING ...]] [--face-mask-regions FACE_MASK_REGIONS [FACE_MASK_REGIONS ...]] [--trim-frame-start TRIM_FRAME_START] [--trim-frame-end TRIM_FRAME_END] [--temp-frame-format {bmp,jpg,png}] [--keep-temp] [--output-image-quality [0-100]] [--output-image-resolution OUTPUT_IMAGE_RESOLUTION] [--output-video-encoder {libx264,libx265,libvpx-vp9,h264_nvenc,hevc_nvenc,h264_amf,hevc_amf}] [--output-video-preset {ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow}] [--output-video-quality [0-100]] [--output-video-resolution OUTPUT_VIDEO_RESOLUTION] [--output-video-fps OUTPUT_VIDEO_FPS] [--skip-audio] [--frame-processors FRAME_PROCESSORS [FRAME_PROCESSORS ...]] [--face-debugger-items FACE_DEBUGGER_ITEMS [FACE_DEBUGGER_ITEMS ...]] [--face-enhancer-model {codeformer,gfpgan_1.2,gfpgan_1.3,gfpgan_1.4,gpen_bfr_256,gpen_bfr_512,gpen_bfr_1024,gpen_bfr_2048,restoreformer_plus_plus}] [--face-enhancer-blend [0-100]] [--face-swapper-model {blendswap_256,inswapper_128,inswapper_128_fp16,simswap_256,simswap_512_unofficial,uniface_256}] [--frame-colorizer-model {ddcolor,ddcolor_artistic,deoldify,deoldify_artistic,deoldify_stable}] [--frame-colorizer-blend [0-100]] [--frame-colorizer-size {192x192,256x256,384x384,512x512}] [--frame-enhancer-model {clear_reality_x4,lsdir_x4,nomos8k_sc_x4,real_esrgan_x2,real_esrgan_x2_fp16,real_esrgan_x4,real_esrgan_x4_fp16,real_hatgan_x4,span_kendata_x4,ultra_sharp_x4}] [--frame-enhancer-blend [0-100]] [--lip-syncer-model {wav2lip_gan}] [--open-browser] [--ui-layouts UI_LAYOUTS [UI_LAYOUTS ...]] run.py: error: argument --execution-providers: invalid choice: 'cuda' (choose from 'dml', 'cpu') None None !!! Exception during processing !!! C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4 could not be loaded with cv. Traceback (most recent call last): File "c:\AI\ComfyUI\execution.py", line 328, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "c:\AI\ComfyUI\execution.py", line 203, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "c:\AI\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File "c:\AI\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) File "C:\AI\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 928, in faceswampgenerate return load_video_cv(faceswap_filename,0,'Disabled',512,512,0,0,1) File "C:\AI\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 446, in load_video_cv (width, height, fps, duration, total_frames, target_frame_time) = next(gen) File "C:\AI\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 365, in cv_frame_generator raise ValueError(f"{video} could not be loaded with cv.") ValueError: C:\AI\ComfyUI\output\deepfuze\faceswap_17353108393250403.mp4 could not be loaded with cv.

MichaelSingh7 avatar Dec 27 '24 14:12 MichaelSingh7

if it helps - I noted that the code calls for "deepfuze.ini" and its missing....

lord-lethris avatar Jan 24 '25 15:01 lord-lethris

I get this error and can't get futher to find the problem. As of now, i've installed unistalled, re installed:

  • Visual studio 2019 (Had the 2022 installed but had conflict with cuda 11.8)
  • FFmpeg full (version 7.1-full_build-www.gyan.dev) installed with chocolate
  • Cuda 11.8 (with path)
  • cuDNN 8.9.2.26 (changed in corresponding folders of CUDA 11.8)
  • ComfyUI (i have the .exe installation. But same problème with the manual installed one)
  • Deepfuze custom nodes, all the google drive depandencies (37 files) put in a "deepfuze" folder in "ComfyUI/models"
  • Tryed to make it work with CPU and changed all the different inputs models possible
  • Pytorch 2.6.0+cu118

got prompt 1 48 video h265-mp4 {'enhancer': 'gfpgan_1.2', 'faceswap_model': 'blendswap_256', 'frame_enhancer': 'real_esrgan_x4', 'face_detector_model': 'scrfd', 'reference_face_index': 1, 'face_mask_padding_left': 1, 'face_mask_padding_right': 1, 'face_mask_padding_bottom': 1, 'face_mask_padding_top': 1, 'device': 'cuda', 'frame_rate': 25.0, 'loop_count': 1, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': False, 'source_images': ['20', 0], 'target_images': ['3', 0], 'format': 'video/h265-mp4', 'pix_fmt': 'yuv420p10le', 'crf': 22, 'save_metadata': ['save_metadata', 'BOOLEAN', {'default': True}]} None !!! Exception during processing !!! expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last): File "C:\Users\Morgan D\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 327, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan D\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 202, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan D\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File "C:\Users\Morgan D\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan D\Documents\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 710, in faceswampgenerate video_format = apply_format_widgets(format_ext, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Morgan D\Documents\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 207, in apply_format_widgets with open(video_format_path, 'r') as stream: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected str, bytes or os.PathLike object, not NoneType

Prompt executed in 1.35 seconds

Any help on where to go search would be welcome... (a solution too XD)

Blsone avatar Mar 06 '25 13:03 Blsone

Yeah so how do we fix this?

Nubebuster avatar Mar 24 '25 07:03 Nubebuster

Getting the same error, steps mentioned on repo front page DO NOT help.

Chizz3x avatar Mar 24 '25 20:03 Chizz3x