pydn / ComfyUI-to-Python-Extension

A powerful tool that translates ComfyUI workflows into executable Python code.
MIT License
1.27k stars 130 forks source link

A problem with running the script #19

Open Adam34332 opened 1 year ago

Adam34332 commented 1 year ago

Hello, I discovered this simple script today and tested it. Some errors occurred during the process. The code is as follows. It is the latest version downloaded. Regarding the file not being found, there seems to be a problem with this path.

FileNotFoundError: [WinError 2] The system can not find the file specified.: 'J:\ComfyUI\ComfyUI-to-Python-Extension\..\web\extensions\CUP-CLIPBOARD'

Cannot import J:\ComfyUI\custom_nodes\Cup-ClipBoard module for custom nodes: [WinError 2] The system can not find the file specified.: 'J:\ComfyUI\ComfyUI-to-Python-Extension\..\web\extensions\CUP-CLIPBOARD !! Trying to start the node Searge-SDXL v4.1 in J:\ComfyUI\custom_nodes\SeargeSDXL Total VRAM 24564 MB, total RAM 65349 MB xformers version: 0.0.21 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : native VAE dtype: torch.bfloat16 WAS Node Suite: BlenderNeko's Advanced CLIP Text Encode found, attempting to enable CLIPTextEncode support. WAS Node Suite: CLIPTextEncode (BlenderNeko Advanced + NSP) node enabled under WAS Suite/Conditioning menu. WAS Node Suite: OpenCV Python FFMPEG support is enabled WAS Node Suite Warning: ffmpeg_bin_path is not set in J:\ComfyUI\custom_nodes\was-node-suite-comfyui\was_suite_config.json config file. Will attempt to use system ffmpeg binaries if available. WAS Node Suite: Finished. Loaded 194 nodes successfully.

    "Success is not just about making money. It's about making a difference." - Unknown

Import times for custom nodes: 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Image-Selector 0.0 seconds: J:\ComfyUI\custom_nodes\sdxl_prompt_styler 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_ADV_CLIP_emb 0.0 seconds: J:\ComfyUI\custom_nodes\stability-ComfyUI-nodes 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_Noise 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler 0.0 seconds: J:\ComfyUI\custom_nodes\sdxl-recommended-res-calc 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-post-processing-nodes 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_Cutoff 0.0 seconds: J:\ComfyUI\custom_nodes\cup.py 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Bmad-DirtyUndoRedo 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus 0.0 seconds: J:\ComfyUI\custom_nodes\masquerade-nodes-comfyui 0.0 seconds (IMPORT FAILED): J:\ComfyUI\custom_nodes\Cup-ClipBoard 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_NestedNodeBuilder 0.0 seconds (IMPORT FAILED): J:\ComfyUI\custom_nodes\AIGODLIKE-COMFYUI-TRANSLATION 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-OpenPose-Editor 0.0 seconds: J:\ComfyUI\custom_nodes\facedetailer 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-QualityOfLifeSuit_Omar92 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyMath 0.0 seconds: J:\ComfyUI\custom_nodes\comfy-plasma 0.0 seconds (IMPORT FAILED): J:\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts 0.0 seconds: J:\ComfyUI\custom_nodes\comfyui-dream-project 0.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale 0.0 seconds: J:\ComfyUI\custom_nodes\comfyui_controlnet_aux 0.0 seconds: J:\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes 0.2 seconds: J:\ComfyUI\custom_nodes\SeargeSDXL 0.3 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Manager 0.3 seconds: J:\ComfyUI\custom_nodes\comfy_controlnet_preprocessors 0.4 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Allor 0.7 seconds: J:\ComfyUI\custom_nodes\comfyui-dynamicprompts 0.7 seconds: J:\ComfyUI\custom_nodes\efficiency-nodes-comfyui 1.4 seconds: J:\ComfyUI\custom_nodes\ComfyUI-Impact-Pack 1.5 seconds: J:\ComfyUI\custom_nodes\was-node-suite-comfyui 3.0 seconds: J:\ComfyUI\custom_nodes\ComfyUI_Custom_Nodes_AlekPet

**Traceback (most recent call last): File "J:\ComfyUI\ComfyUI-to-Python-Extension\comfyui_to_python.py", line 460, in ComfyUItoPython(input_file=input_file, output_file=output_file, queue_size=queue_size) File "J:\ComfyUI\ComfyUI-to-Python-Extension\comfyui_to_python.py", line 425, in init self.execute() File "J:\ComfyUI\ComfyUI-to-Python-Extension\comfyui_to_python.py", line 441, in execute load_order = load_order_determiner.determine_load_order() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "J:\ComfyUI\ComfyUI-to-Python-Extension\comfyui_to_python.py", line 120, in determine_load_order self._load_special_functions_first() File "J:\ComfyUI\ComfyUI-to-Python-Extension\comfyui_to_python.py", line 156, in _load_special_functions_first class_def = self.node_class_mappings[self.data[key]['class_type']]()


 KeyError: 'CheckpointLoader|pysssss'**
(base) PS J:\ComfyUI\ComfyUI-to-Python-Extension>
pydn commented 1 year ago

Do you get the same import failed message when you run ComfyUI directly through the GUI?

Adam34332 commented 1 year ago

Do you get the same import failed message when you run ComfyUI directly through the GUI?

No, everything is normal in comfyui. This is a complete and executable workflow. The problem should occur on the custom node.

MaxTran96 commented 1 year ago

i got the same error

Traceback (most recent call last): File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/comfyui_to_python.py", line 460, in ComfyUItoPython(input_file=input_file, output_file=output_file, queue_size=queue_size) File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/comfyui_to_python.py", line 425, in init self.execute() File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/comfyui_to_python.py", line 441, in execute load_order = load_order_determiner.determine_load_order() File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/comfyui_to_python.py", line 120, in determine_load_order self._load_special_functions_first() File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/comfyui_to_python.py", line 156, in _load_special_functions_first class_def = self.node_class_mappings[self.data[key]['class_type']]() KeyError: 'BatchPromptSchedule'

MaxTran96 commented 1 year ago

workflow_api.json

MaxTran96 commented 1 year ago

I did some investigation and it seems like its not able to append classes from https://github.com/FizzleDorf/ComfyUI_FizzNodes/blob/main/ScheduledNodes.py to NODE_CLASS_MAPPINGS

MaxTran96 commented 1 year ago

I think this commit should fix my error https://github.com/FizzleDorf/ComfyUI_FizzNodes/pull/15/commits/35c968addf3e4da6575aa4ee833f5aa58e217161

MaxTran96 commented 1 year ago

I also ran into an issue trying to import this into custom_node even tho ComfyUI workflow works fine for me

module_name is ComfyUI-Frame-Interpolation Traceback (most recent call last): File "/workspace/ComfyUI/ComfyUI-to-Python-Extension/../nodes.py", line 1735, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/workspace/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/init.py", line 9, in from models.gmfss_fortuna import GMFSS_Fortuna_VFI File "/workspace/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/models/gmfss_fortuna/init.py", line 2, in from utils import load_file_from_github_release, preprocess_frames, postprocess_frames, generic_frame_loop, InterpolationStateList ImportError: cannot import name 'load_file_from_github_release' from 'utils' (/workspace/ComfyUI/ComfyUI-to-Python-Extension/utils.py)

Cannot import /workspace/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation module for custom nodes: cannot import name 'load_file_from_github_release' from 'utils' (/workspace/ComfyUI/ComfyUI-to-Python-Extension/utils.py)

MaxTran96 commented 1 year ago

found the issue its for some reason trying to import load_file_from_github_release from utils of your repo ComfyUI-to-Python-Extension instead of from utils of repo ComfyUI-Frame-Interpolation. So what i did is renamed your utils.py to comfyui_util.py and it works

pydn commented 1 year ago

Thank you for working on this, @MaxTran96!

ManiRoxtar commented 3 months ago

I'm facing the same issue, somehow my custom nodes are not added to my node_class_mappings. Kindly help as to how to solve it.