Error deepfuze faceswap TypeError: expected str, bytes or os.PathLike object, not NoneType
Hi have all correctly installed C++ cudann etc . comfyui and dependencie updated ;)
ComfyUI-Manager] All startup tasks have been completed. 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}]} None !!! Exception during processing !!! expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last): File "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\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 "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\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 "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 723, in faceswampgenerate kwargs['crf'] = 22 ^^^^ File "G:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 220, in apply_format_widgets def apply_format_widgets(format_name, kwargs): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected str, bytes or os.PathLike object, not NoneType
Prompt executed in 0.90 seconds
Help me please :) deepfuze no create repertory VHS_video_formats i made myself with .json but not work . comfyui portable install
the error has its origin in a missing file named VHS_decode.json", sometimes it comes with ffmpeg. in my case: no: so I disabled DeepFuze and i will be waitung for a solution an for "safetensor"-models.
I have exactly the same probleme! At least i found the same issue related somewhere... I'm a nood and i have installed and unistalled a dozen times comfyui etc... Made me mad not to even find some one with same issue.
Landfieger, i'll ask a stupid question, but there is no solution to simply find and place (where?) the VHS_Decode.json? Or at least i could check if i have it, so i need to keep searching for other origin of the problem...
By the way how did you read/understand/know it is that file missing?
Hopping really hard to hear from you...
Just in case here is my error verdict
To see the GUI go to: http://127.0.0.1:8000 [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json FETCH ComfyRegistry Data: 5/36 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': 25.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}]} 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
Landfieger, i'll ask a stupid question, but there is no solution to simply find and place (where?) the VHS_Decode.json? Or at least i could check if i have it, so i need to keep searching for other origin of the problem...
I don't know, where to find and manually edit ist nearly impossible, there a multiple definitions on what's in the file ...
There is a project with the same name (VHS-decode), but they don't provide the file ... Sorry ...
Landfieger, i'll ask a stupid question, but there is no solution to simply find and place (where?) the VHS_Decode.json? Or at least i could check if i have it, so i need to keep searching for other origin of the problem...
I don't know, where to find and manually edit ist nearly impossible, there a multiple definitions on what's in the file ...
There is a project with the same name (VHS-decode), but they don't provide the file ... Sorry ...
Thank you for responding :))) Greatly appreciated. I did mean while uninstall ffmpeg and re install it with choco (chocolayte?) that gives the option to install a "full version". But didn't solve the problem. I'm slowly starting to admit that i will probably not be abble to test deepfuze. I'm actually curious to know if it is still working for anyone...
So in looking at the errors I see that it definitely comes from that VHS_video_formats file format json - will someone with this upload the contents for inspection?
def apply_format_widgets(format_name, kwargs):
video_format_path = folder_paths.get_full_path("VHS_video_formats", format_name + ".json")
print(video_format_path)
with open(video_format_path, 'r') as stream:
video_format = json.load(stream)
for w in gen_format_widgets(video_format):
print(w[0][0])
assert(w[0][0] in kwargs)
if len(w[0]) > 3:
w[0] = Template(w[0][3]).substitute(val=kwargs[w[0][0]])
else:
w[0] = str(kwargs[w[0][0]])
return video_format
This problem has been around for three months now.
Same problem here.
got prompt FETCH ComfyRegistry Data: 70/81 codeformer 25.0 video/h265-mp4 video h265-mp4 {'enhancer': 'codeformer', 'frame_enhancer': 'real_esrgan_x2', 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'trim_frame_start': 0, 'trim_frame_end': 0, 'device': 'cuda', 'frame_rate': 25.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'images': ['2', 0], 'audio': ['8', 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\bgellis\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\bgellis\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\bgellis\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File "C:\Users\bgellis\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\Documents\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1129, in lipsyncgenerate video_format = apply_format_widgets(format_ext, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\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
I switched to LatentSync which works better anyway
On Mon, Apr 7, 2025, 1:46 PM Mattstadon @.***> wrote:
Same problem here.
got prompt FETCH ComfyRegistry Data: 70/81 codeformer 25.0 video/h265-mp4 video h265-mp4 {'enhancer': 'codeformer', 'frame_enhancer': 'real_esrgan_x2', 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'trim_frame_start': 0, 'trim_frame_end': 0, 'device': 'cuda', 'frame_rate': 25.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'images': ['2', 0], 'audio': ['8', 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 @.***\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 @.***\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 @.\resources\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File @.\resources\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\Documents\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1129, in lipsyncgenerate video_format = apply_format_widgets(format_ext, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\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
— Reply to this email directly, view it on GitHub https://github.com/SamKhoze/ComfyUI-DeepFuze/issues/71#issuecomment-2784587288, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCGRMASONBWXCU4VTRHKUD2YLPZFAVCNFSM6AAAAABXUM7D32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBUGU4DOMRYHA . You are receiving this because you commented.Message ID: @.***> [image: Mattstadon]Mattstadon left a comment (SamKhoze/ComfyUI-DeepFuze#71) https://github.com/SamKhoze/ComfyUI-DeepFuze/issues/71#issuecomment-2784587288
Same problem here.
got prompt FETCH ComfyRegistry Data: 70/81 codeformer 25.0 video/h265-mp4 video h265-mp4 {'enhancer': 'codeformer', 'frame_enhancer': 'real_esrgan_x2', 'face_mask_padding_left': 0, 'face_mask_padding_right': 0, 'face_mask_padding_bottom': 0, 'face_mask_padding_top': 0, 'trim_frame_start': 0, 'trim_frame_end': 0, 'device': 'cuda', 'frame_rate': 25.0, 'loop_count': 0, 'filename_prefix': 'deepfuze', 'pingpong': False, 'save_output': True, 'images': ['2', 0], 'audio': ['8', 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 @.***\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 @.***\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 @.\resources\ComfyUI\execution.py", line 174, in _map_node_over_list process_inputs(input_dict, i) File @.\resources\ComfyUI\execution.py", line 163, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\Documents\ComfyUI\custom_nodes\ComfyUI-DeepFuze\nodes.py", line 1129, in lipsyncgenerate video_format = apply_format_widgets(format_ext, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bgellis\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
— Reply to this email directly, view it on GitHub https://github.com/SamKhoze/ComfyUI-DeepFuze/issues/71#issuecomment-2784587288, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCGRMASONBWXCU4VTRHKUD2YLPZFAVCNFSM6AAAAABXUM7D32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBUGU4DOMRYHA . You are receiving this because you commented.Message ID: @.***>
Hi all, I also encountered the issue running a video workflow (video/h265-mp4) in ComfyUI-DeepFuze with ComfyUI-VideoHelperSuite, and here’s how I fixed them: Error: TypeError: expected str, bytes or os.PathLike object, not NoneType when using video/h265-mp4 format. Cause: The video_h265-mp4.json file was missing or misnamed in ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/video_formats, and VHS_video_formats wasn’t registered in folder_paths.py.
Fix: Rename h265-mp4.json to video_h265-mp4.json in ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/video_formats: cmd cd ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/video_formats copy h265-mp4.json video_h265-mp4.json
Add VHS_video_formats to ComfyUI/folder_paths.py (after other folder_names_and_paths entries):
folder_names_and_paths["VHS_video_formats"] = ([os.path.join(base_path, "custom_nodes", "ComfyUI-VideoHelperSuite", "video_formats")], {".json"})
Same issue, but i didnt understand that last part of your solution... there is not a file name folde_paths.py at Comfyui root
Add VHS_video_formats to ComfyUI/folder_paths.py (after other folder_names_and_paths entries):
folder_names_and_paths["VHS_video_formats"] = ([os.path.join(base_path, "custom_nodes", "ComfyUI-VideoHelperSuite", "video_formats")], {".json"})