Closed RangerFrank closed 11 months ago
The cause of the issue is that the String Function doesn't support list input. From my perspective, the Saver is working fine. It outputs a list because you have inputted a list into it (WD14 Tagger has two text boxes means it is a list).
Normally, when the batch size is set to 2, only 2 images should be output. The reason why you are seeing 2x2 images in your workflow is that the list output by the WD14 Tagger doubles everything.
It seems like you want to store the metadata of images separately as text files, which seems to be a very practical feature. I can consider adding this function to the Prompt Saver.
Yes, the intention is to create keyword files at image generation for a number of purposes including being able to reference, parse, and process those keywords back into the same or different workflows for an iterative generation, having training files pre-made at the generation stage also provides flexibility and removes a step for training loras by including it in image gen.
Also I can't get pythongosssss savetext to work and I think it might be to do with the same issue with being passed a list not a string. Do you know if there's a simple way to string split the WD14 output in the meantime?
The comfyroll includes a node called “CR Split String” which can be used to split a string.
Please try out the save_metadata_file
feature in the new version of Prompt Saver
node.
This works well for my purposes, appreciated.
Description
Single images work fine, increasing batch size results in multiplying results, 2x2, 3x3, etc. So a with a batch size set to 4 you get 16 images being processed in SD Prompt Saver, there's also a problem with filename output sanitation, error related:
Error occurred when executing StringFunction|pysssss:
'list' object has no attribute 'replace'
File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts\py\string_function.py", line 43, in exec out = text_a.replace(text_b, text_c) ^^^^^^^^^^^^^^
Similar issue seems to occur with SD Prompt Merge when using null strings that I already posted about.
Reproduction steps
Image file
Workflow image: