WASasquatch / was-node-suite-comfyui

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

There is a problem with some nodes #202

Open mijuku233 opened 1 year ago

mijuku233 commented 1 year ago

I have written these questions in the ‘note’ node of the workflow, please check workflow.zip

WASasquatch commented 1 year ago

Please provide full console errors and explain your problem. I more then likely don't have custom nodes you have to run your workflow, and I don't use ComfyUI Manager.

mijuku233 commented 1 year ago

@WASasquatch I've packaged the full 'console errors' and workflow screenshots here, including comments on the issues re.zip

WASasquatch commented 1 year ago

Please use the issue discussion to document issues. Downloads and images do not help really.

The only issue I see here is bounded with mask. I did not create those nodes though so would need to look into them. They were a PR.

Replacement is per item. Not new line. It's a input version of regular find and replace prior to being able to change fields to inputs.

Save Image requires a image input. Same for save text files.

mijuku233 commented 1 year ago

@WASasquatch Sorry, I want to use pictures to help express the question, but I can't upload pictures, so I can only upload compressed files. I'm building a workflow that anyone can use easily, and your awesome custom node is indispensable, but I encountered some problems when building the workflow, which I'll describe below.

Regarding the 'text find and replace input' node, I'd like to use it to find and replace multiple prompts, but currently it doesn't seem to support doing so. So I hope to improve it so that it supports search and replace of multiple prompts.

Regarding 'bounded image blend with mask', its effect is wrong and the composite position is offset. Obviously this is a bug.

Regarding 'video dump frames', 'processed count' outputs 'none'. I'm not sure if it's a bug or if I'm connecting to the wrong node?

Regarding 'image save', I wanted to set the save path to the upper directory, so I tried to fill in .../, and a serious error occurred. I thought it should adopt the same path setting rules as 'save text file'.

WASasquatch commented 1 year ago

Video dump mode needs to be able to read the video codec to dump frames, so likely won't work for most videos without installing the codecs to your system and ffmpeg. Save Image path is relative to ComfyUI outputs, or absolute path to location.

mijuku233 commented 1 year ago

@WASasquatch My English is very poor and I used Google Translate, so maybe these translated descriptions are not very accurate and caused you to misunderstand? Regarding 'video dump frames', the problem I encountered is that 'processed count' cannot output numbers to other nodes, it reports an error, the following is the error message output by the console:

Error occurred when executing Number to Int:

int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 11682, in number_to_int return (int(number), )

mijuku233 commented 1 year ago

full console errors (video dump frames): got prompt Prompt executor has been patched by Job Iterator! Saved frame 0 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0000.png Saved frame 1 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0001.png Saved frame 2 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0002.png Saved frame 3 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0003.png Saved frame 4 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0004.png Saved frame 5 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0005.png Saved frame 6 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0006.png Saved frame 7 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0007.png Saved frame 8 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0008.png Saved frame 9 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0009.png Saved frame 10 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0010.png Saved frame 11 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0011.png Saved frame 12 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0012.png Saved frame 13 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0013.png Saved frame 14 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0014.png Saved frame 15 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0015.png Saved frame 16 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0016.png Saved frame 17 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0017.png Saved frame 18 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0018.png Saved frame 19 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0019.png Saved frame 20 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0020.png Saved frame 21 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0021.png Saved frame 22 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0022.png Saved frame 23 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0023.png Saved frame 24 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0024.png Saved frame 25 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0025.png Saved frame 26 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0026.png Saved frame 27 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0027.png Saved frame 28 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0028.png Saved frame 29 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0029.png Saved frame 30 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0030.png Saved frame 31 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0031.png Saved frame 32 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0032.png Saved frame 33 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0033.png Saved frame 34 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0034.png Saved frame 35 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0035.png Saved frame 36 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0036.png Saved frame 37 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0037.png Saved frame 38 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0038.png Saved frame 39 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0039.png Saved frame 40 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0040.png Saved frame 41 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0041.png Saved frame 42 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0042.png Saved frame 43 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0043.png Saved frame 44 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0044.png Saved frame 45 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0045.png Saved frame 46 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0046.png Saved frame 47 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0047.png Saved frame 48 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0048.png Saved frame 49 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0049.png Saved frame 50 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0050.png Saved frame 51 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0051.png Saved frame 52 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0052.png Saved frame 53 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0053.png Saved frame 54 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0054.png Saved frame 55 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0055.png Saved frame 56 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0056.png Saved frame 57 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0057.png Saved frame 58 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0058.png Saved frame 59 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0059.png Saved frame 60 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0060.png Saved frame 61 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0061.png Saved frame 62 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0062.png Saved frame 63 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0063.png Saved frame 64 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0064.png Saved frame 65 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0065.png Saved frame 66 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0066.png Saved frame 67 to E:\AI\ComfyUI_windows_portable\ComfyUI\input\MyVideo\frame_0067.png !!! Exception during processing !!! Traceback (most recent call last): File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 11682, in number_to_int return (int(number), ) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Prompt executed in 5.46 seconds

mijuku233 commented 1 year ago

Regarding 'image save', when I fill .../frame into output_path and run, it reports errors, the following are full console errors:

got prompt Prompt executor has been patched by Job Iterator! WAS Node Suite Warning: The path E:\AI\ComfyUI_windows_portable\ComfyUI\output\.../frame specified doesn't exist! Creating directory. !!! Exception during processing !!! Traceback (most recent call last): File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 6979, in was_save_images os.makedirs(output_path, exist_ok=True) File "os.py", line 225, in makedirs FileNotFoundError: [WinError 3] System can not find the route. : 'E:\AI\ComfyUI_windows_portable\ComfyUI\output\.../frame'

Prompt executed in 0.01 seconds

mijuku233 commented 1 year ago

For convenience, I want to save the image in the folder 'ComfyUI_windows_portable\frame'. Since the workflow I built will be used by different people, I can only fill in the relative path, so I tried to use ' .../ ' Locate to the directory I want, but failed

mijuku233 commented 1 year ago

A new bug about ‘image rembg’, the following is part of the error message:

I'm not a programmer, but I think changing [False, True] to ['false', 'true'] can solve this bug.

WASasquatch commented 1 year ago

A new bug about ‘image rembg’, the following is part of the error message:

  • Image Rembg (Remove Background) eaac0a33-a8b8-4c07-8a4b-169c968da4c3:

    • Value not in list: post_processing: 'True' not in [False, True]
    • Value not in list: only_mask: 'True' not in [False, True]
    • Value not in list: alpha_matting: 'True' not in [False, True] Output will be ignored

I'm not a programmer, but I think changing [False, True] to ['false', 'true'] can solve this bug.

Seems like you have an old node, and there are changes done to it. Delete and recreate the node.

As for the same image no, again, it must be absolute or relative to the output dir. So for that path you need full path like c:\ComfyUI_windows_portable\frame to be absolute and break out of servers relative paths. I'll take a look at the other stuff when I am at my PC.

WASasquatch commented 1 year ago

@WASasquatch My English is very poor and I used Google Translate, so maybe these translated descriptions are not very accurate and caused you to misunderstand? Regarding 'video dump frames', the problem I encountered is that 'processed count' cannot output numbers to other nodes, it reports an error, the following is the error message output by the console:

Error occurred when executing Number to Int:

int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 11682, in number_to_int return (int(number), )

Not sure what this is about. Code looks fine, so it must be getting a NoneType returned from whatever node you had hooked up to it

mijuku233 commented 1 year ago

@WASasquatch I reinstalled 'was-node-suite-comfyui' and created a new 'Image Rembg', and there was no change in the result. I can confirm that the error was not caused by the old node. I looked through the code and found the cause of the error, here is the code that caused the error: "transparency": (["true","false"],), "model": (["u2net", "u2netp", "u2net_human_seg", "silueta", "isnet-general-use", "isnet-anime"],), "post_processing": ([False, True],), "only_mask": ([False, True],), "alpha_matting": ([False, True],), After I changed [False, True] to ["false", "true"], the error disappeared

DigitalIO commented 1 year ago

The error reads like a string is being passed to the function instead of the required boolean. Changing the requirements to accept a string will cause all settings to always be applied, which is what you modified.

That said, I can't replicate the issue on my end, ComfyUI does not allow me to put a string for the value. Please make sure all source code is up-to-date and not modified, both ComfyUI and was-node-suite-comfyui. Build the workflow from scratch on non-modified code. Using modified code and then loading a workflow from that code can cause the issue you are experiencing.

If that doesn't fix the issue can you provide a workflow that produces the issue, as well as what browser you are using.

mijuku233 commented 1 year ago

@DigitalIO When I try to convert those three widgets to input, it will always be 'true', inputting 'false' or 'False' cannot change it, comfyui will not report an error because of this, but it will in comfybox. I've created a process that will help you better understand what I'm talking about. rembg.zip

WASasquatch commented 1 year ago

ComfyUI only uses strings for combos (["true","false"],)

Then you need to convert the result var = (var == "true") in the node function to get the boolean

DigitalIO commented 1 year ago

I dug into the ComfyUI code a bit more and I see that combos are handled as strings, but doesn't reject booleans. They just happen to work until it is converted to an input, then a string can be passed to them. Thanks for that bit of information. So I updated the types to actually use BOOLEAN which look nicer in the UI.

However, that doesn't fix the entire issue. It is still possible to get ComfyUI to send an incorrect type to the node, as demonstrated in the workflow provided. To correct for the issue the type of each "boolean" is checked and converted from some sensible values. ("true", "1", 1, 1.0 are all True now). For future readers, i decided to make the function convert string representations of falsey statements as defined in Truth Value Testing link below to better conform with the Python standard. So the node will now work if an actual boolean is supplied or a string or numeric representation is supplied.

@mijuku233 Beware how the ImpactValueReciever node works. When 'typ' is set to "BOOLEAN", the 'value' is passed to the bool() function which relies on Truth Value Testing for its result. Because ComfyUI handles the input field as a string value, the ONLY way to get a False boolean is to input an empty string. All other values will always evaluate to True. This is probably not the intended function of that option.

Any further feedback or questions welcome.