Closed JPS-GER closed 8 months ago
Hey, do you have a font file in the comfyui/fonts folder?
I have the same problem and use a font in c:\windows\fonts. This worked before, until I updated Python and Torch:
Hey, do you have a font file in the comfyui/fonts folder?
Not in the ComfyUI folder, just in c:\windows\fonts - which was no problem until ComfyUI was updated to a newer version of Python and Torch a few days ago.
Looks like it was an issue caused by the new Pillow version 10.
Can you please update mikey nodes and try again?
Still happens after the update:
What about now?
Ok, hopefully this time it works. I also tweaked the positioning for multiple lines to stop the bottom row from being cut off.
If you get 'undefined' in the caption like I did, removing and re-adding the node fixed that issue.
Thanks, it works again. But text gets still cut off in some cases:
With a different font (Arial standard, instead of Arial Black), it works better:
I get the following error with Python 3.11.6 + Torch 2.1.0+cu121 (also used by the latest ComfyUI Standalone version):
!!! Exception during processing !!! Traceback (most recent call last): File "C:\Users\jpswi\ComfyUI_full\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jpswi\ComfyUI_full\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 "C:\Users\jpswi\ComfyUI_full\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jpswi\ComfyUI_full\ComfyUI\custom_nodes\mikey_nodes\mikey_nodes.py", line 2943, in caption wrapped_text_height = len(wrapped_lines) font.getsize('A')[1] # Estimate using height of letter 'A' ^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'