diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 16:17:02 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 16:17:02 +0000 |
commit | 45e8fa0e07db0fe04f91fef070a02925a40c8354 (patch) | |
tree | 438dcd6c5b10a3068e6f7677457c55aa5d1d4285 /modules/images.py | |
parent | 095830e1e8a99276b3055c720981e89fc6af853d (diff) | |
download | stable-diffusion-webui-gfx803-45e8fa0e07db0fe04f91fef070a02925a40c8354.tar.gz stable-diffusion-webui-gfx803-45e8fa0e07db0fe04f91fef070a02925a40c8354.tar.bz2 stable-diffusion-webui-gfx803-45e8fa0e07db0fe04f91fef070a02925a40c8354.zip |
X/Y plot can not output the final result with this error message #244
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py index 05fc4206..d742ed98 100644 --- a/modules/images.py +++ b/modules/images.py @@ -135,7 +135,12 @@ def draw_grid_annotations(im, width, height, hor_texts, ver_texts): fontsize = (width + height) // 25
line_spacing = fontsize // 2
- fnt = ImageFont.truetype(opts.font or Roboto, fontsize)
+
+ try:
+ fnt = ImageFont.truetype(opts.font or Roboto, fontsize)
+ except Exception:
+ fnt = ImageFont.truetype(Roboto, fontsize)
+
color_active = (0, 0, 0)
color_inactive = (153, 153, 153)
|