WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.19k stars 178 forks source link

error loading #79

Closed GregorioBrc closed 1 year ago

GregorioBrc commented 1 year ago

Loading: ComfyUI-Impact-Pack (V2.5.1)

Traceback (most recent call last): File "/content/ComfyUI/nodes.py", line 1352, 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 "/content/ComfyUI/custom_nodes/was-node-suite-comfyui/init.py", line 1, in from .WAS_Node_Suite import NODE_CLASS_MAPPINGS File "/content/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2418 else: ^^^^ SyntaxError: invalid syntax

Cannot import /content/ComfyUI/custom_nodes/was-node-suite-comfyui module for custom nodes: invalid syntax (WAS_Node_Suite.py, line 2418)

GregorioBrc commented 1 year ago

I removed the else and the next line, I got comfyui to load it, but now the cut face node spits this out:

Traceback (most recent call last): File "/content/ComfyUI/execution.py", line 257, in execute recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed, prompt_id, self.outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) [Previous line repeated 3 more times] File "/content/ComfyUI/execution.py", line 128, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/content/ComfyUI/execution.py", line 75, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/content/ComfyUI/execution.py", line 68, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/content/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2410, in image_crop_face return self.crop_face(tensor2pil(image), cascade_xml, crop_padding_factor, use_fr) NameError: name 'use_fr' is not defined

WASasquatch commented 1 year ago

I removed the else and the next line, I got comfyui to load it, but now the cut face node spits this out:

Traceback (most recent call last): File "/content/ComfyUI/execution.py", line 257, in execute recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed, prompt_id, self.outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) [Previous line repeated 3 more times] File "/content/ComfyUI/execution.py", line 128, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/content/ComfyUI/execution.py", line 75, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/content/ComfyUI/execution.py", line 68, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/content/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2410, in image_crop_face return self.crop_face(tensor2pil(image), cascade_xml, crop_padding_factor, use_fr) NameError: name 'use_fr' is not defined

Remake your node. face_recognition is removed.

GregorioBrc commented 1 year ago

So the Image Crop Face and Image Paste Face nodes are no longer useful?

WASasquatch commented 1 year ago

No, just face_recognition wasn't useful. It almost always didn't select a face, just random thing. Cascades work much better and less frequency of random selections. It also called issues on windows installations while rarely used.

I am looking into other options, but they all have funky installs when it comes to windows for some reason. But face crop works better right now with just cascades. Though I myself have began using CLIPSeg nodes and building a face make.

I make four masks. A mask of "face" a mask of "eyes" and a mask of "ears", then I subtract a mask of "hair" to isolate just facial bits and do a inpaint face fix. Sometimes hair subtraction isn't necessary unless you really don't want it messing with hair boundaries near face.

GregorioBrc commented 1 year ago

interesting, although I wasn't referring to that 😅 I thought you were going to discontinue those two nodes since it still comes up with the error:

Traceback (most recent call last): File "/content/ComfyUI/execution.py", line 257, in execute recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed, prompt_id, self.outputs_ui) File "/content/ComfyUI/execution.py", line 120, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed, prompt_id, outputs_ui) File "/content/ComfyUI/execution.py", line 128, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/content/ComfyUI/execution.py", line 75, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/content/ComfyUI/execution.py", line 68, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/content/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 2502, in image_crop_face return self.crop_face(tensor2pil(image), cascade_xml, crop_padding_factor, use_fr) NameError: name 'use_fr' is not defined

I saw that removing use_fr from that return works normally.

WASasquatch commented 1 year ago

Ooh forgot to remove the pass to the crop function from the node function.