stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Exception: No usable font found (tried arial.ttf, DejaVuSans.ttf)

Open Slamsneider opened this issue 4 years ago • 11 comments

What happened?

Yesterday ok.

Today i get this error msg in console and in webui after rendering the image:

"No usable font found..."

and is unable to continue.

I've seen others (today) with same problem but cannot find posts again.

/sEi

Version

0.0.1 (Default)

What browsers are you seeing the problem on?

Firefox, Chrome

Where are you running the webui?

Colab

Custom settings

Nothing changed from original

Relevant log output

Iteration: 1/1
100% 50/50 [00:19<00:00,  2.50it/s]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gradio/routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 641, in process_api
    predictions, duration = await self.call_function(fn_index, processed_input)
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 556, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "scripts/webui.py", line 998, in txt2img
    output_images, seed, info, stats = process_images(
  File "scripts/webui.py", line 923, in process_images
    grid = image_grid(output_images, batch_size)
  File "scripts/webui.py", line 419, in image_grid
    fnt = get_font(30)
  File "scripts/webui.py", line 401, in get_font
    raise Exception(f"No usable font found (tried {', '.join(fonts)})")
Exception: No usable font found (tried arial.ttf, DejaVuSans.ttf)

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Slamsneider avatar Sep 03 '22 18:09 Slamsneider

apt install fonts-dejavu-core

AbdBarho avatar Sep 03 '22 19:09 AbdBarho

Hi Slamsneider,

I experienced the same problem. Unfortunately I have no answer yet. Im using Firefox, but I have also tried whit chrome, and it's the same. I changed to another google account, and the problem is still there. I hope anyone can solve this issue.

Stormarc2 avatar Sep 03 '22 19:09 Stormarc2

Same problem Firefox and chrome.

HotChanga avatar Sep 03 '22 19:09 HotChanga

Same problem here, I'm using Vivaldi browser

Weaita avatar Sep 03 '22 19:09 Weaita

Same problem here too... I really don't know what's wrong, can someone help me (us)?

lolguppy avatar Sep 03 '22 19:09 lolguppy

I got it working with running this code in a cell:

!wget https://github.com/matomo-org/travis-scripts/blob/master/fonts/Arial.ttf?raw=true -O /content/stable-diffusion/arial.ttf !sudo apt-get install fonts-dejavu !sudo fc-cache

lolguppy avatar Sep 03 '22 19:09 lolguppy

I got it working with running this code in a cell:

!wget https://github.com/matomo-org/travis-scripts/blob/master/fonts/Arial.ttf?raw=true -O /content/stable-diffusion/arial.ttf !sudo apt-get install fonts-dejavu !sudo fc-cache

Does it matter where we put this? I'm a complete noob at all of this stuff.

nicko786 avatar Sep 03 '22 19:09 nicko786

I got it working with running this code in a cell: !wget https://github.com/matomo-org/travis-scripts/blob/master/fonts/Arial.ttf?raw=true -O /content/stable-diffusion/arial.ttf !sudo apt-get install fonts-dejavu !sudo fc-cache

Does it matter where we put this? I'm a complete noob at all of this stuff.

If you just put it anywhere and you run it BEFORE the last cell (the gradio link cell) you'd be fine I think!

lolguppy avatar Sep 03 '22 19:09 lolguppy

I got it working with running this code in a cell: !wget https://github.com/matomo-org/travis-scripts/blob/master/fonts/Arial.ttf?raw=true -O /content/stable-diffusion/arial.ttf !sudo apt-get install fonts-dejavu !sudo fc-cache

Does it matter where we put this? I'm a complete noob at all of this stuff.

If you just put it anywhere and you run it BEFORE the last cell (the gradio link cell) you'd be fine I think!

That worked! Thanks!!

nicko786 avatar Sep 03 '22 20:09 nicko786

Woow ! It worked ! Thank you so much, you're great !

Stormarc2 avatar Sep 03 '22 20:09 Stormarc2

It worked!

HotChanga avatar Sep 03 '22 21:09 HotChanga