Skip to content

Commit

Permalink
Merge pull request #107 from 0x2b3bfa0/patch-2
Browse files Browse the repository at this point in the history
Fix #41 by using the default font
  • Loading branch information
rinongal authored Nov 23, 2022
2 parents 0a950b4 + 66034ff commit 26ed44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldm/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def log_txt_as_img(wh, xc, size=10):
for bi in range(b):
txt = Image.new("RGB", wh, color="white")
draw = ImageDraw.Draw(txt)
font = ImageFont.truetype('data/DejaVuSans.ttf', size=size)
font = ImageFont.load_default()
nc = int(40 * (wh[0] / 256))
lines = "\n".join(xc[bi][start:start + nc] for start in range(0, len(xc[bi]), nc))

Expand Down

0 comments on commit 26ed44f

Please sign in to comment.