stable-diffusion-webui-forge
stable-diffusion-webui-forge copied to clipboard
AttributeError: 'ImageDraw' object has no attribute 'multiline_textsize'
Hi, while trying to use the X/Y/Z plot script to compare different checkpoints, at the end of the images generation the final grid is not generated and I get this error on the terminal:
Traceback (most recent call last):
File "/home/software/forge-webui/modules_forge/main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "/home/software/forge-webui/modules/txt2img.py", line 128, in txt2img_function
processed = modules.scripts.scripts_txt2img.run(p, *p.script_args)
File "/home/software/forge-webui/modules/scripts.py", line 792, in run
processed = script.run(p, *script_args)
File "/home/software/forge-webui/scripts/xyz_grid.py", line 793, in run
processed = draw_xyz_grid(
File "/home/software/forge-webui/scripts/xyz_grid.py", line 404, in draw_xyz_grid
grid = images.draw_grid_annotations(grid, grid_max_w, grid_max_h, hor_texts, ver_texts, margin_size)
File "/home/software/forge-webui/modules/images.py", line 228, in draw_grid_annotations
draw_texts(d, x, y, hor_texts[col], fnt, fontsize)
File "/home/software/forge-webui/modules/images.py", line 171, in draw_texts
while drawing.multiline_textsize(line.text, font=fnt)[0] > line.allowed_width and fontsize > 0:
AttributeError: 'ImageDraw' object has no attribute 'multiline_textsize'
'ImageDraw' object has no attribute 'multiline_textsize
I did some search beforehand, some people mention that the Pillow package removed ImageDraw.multiline_textsize() form version 10.0, the issue here is, I checked the requirements_versions.txt file on my Forge installation directory, and the Pillow version is 9.5.0. These are the specs of my installation:
f2.0.1v1.10.1-previous-669-gdfdcbab6 • python: 3.10.15 • torch: 2.3.1+cu121 • xformers: N/A • gradio: 4.40.0