TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.48k stars 1.3k forks source link

ModuleNotFoundError: No module named 'diskcache' #2803

Open dymension opened 5 months ago

dymension commented 5 months ago

Everything was working fine yesterday night (24-04-12) on Google Collab but this morning I have a sudden error message ending by "ModuleNotFoundError: No module named 'diskcache'"

Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  [...]
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extensions.py", line 9, in <module>
    from modules import shared, errors, cache, scripts
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/cache.py", line 6, in <module>
    import diskcache
ModuleNotFoundError: No module named 'diskcache'

Still, cache.py is there I have no idea what happened during the night

Reseting all folders and redownloading Automatci 1111 from TheLastBen doesn't solve the issue

dymension commented 5 months ago

OK, I solved this by just adding a line code into the collab sheet and writing: pip install diskcache

Then run this line

image

Everything is solved

70pice commented 5 months ago

Can't use mov2mov

EvilClivE commented 5 months ago

Thank you @dymension for sharing this quick fix! 👌😎👍- I too was also puzzled this morning when it had seemingly broken overnight!

Sticking this in a new code cell above the 'Start Stable-Diffusion' cell works a treat:

diskcache

taron37 commented 5 months ago

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion" What is wrong?

File "", line 2 pip install diskcache ^ SyntaxError: invalid syntax

EvilClivE commented 5 months ago

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion" What is wrong?

File "", line 2 pip install diskcache ^ SyntaxError: invalid syntax

Yeah, I also got this syntax error at first too, but I'm not sure what causes it. Try disconnecting and deleting active runtime, then remove any spaces/empty code lines before and after the pip install diskcache code text. The syntax error highlight magically disappeared for me.

For testing, I just created a blank/new notebook and the syntax works fine when the cell is run. 🤔

dymension commented 5 months ago

Are you sure you add the command line as a new code block ? You cann add code block by hovering an hidden line above each step (it's quite tricky) image

You can also try to add the line upper in the script. I set it right after Automatic Install image

taron37 commented 5 months ago

Yeah, I also got this syntax error at first too, but I'm not sure what causes it. Try disconnecting and deleting active runtime, then remove any spaces/empty code lines before and after the pip install diskcache code text. The syntax error highlight magically disappeared for me.

For testing, I just created a blank/new notebook and the syntax works fine when the cell is run. 🤔

I solved the problem to put "!"

!pip install diskcache

mcqx4 commented 5 months ago

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion" What is wrong?

File "", line 2 pip install diskcache ^ SyntaxError: invalid syntax

Use " !pip " instead of "pip"

A3734 commented 5 months ago

"Running !pip install diskcache upgrades the module to version 1.9, it seems. However, several errors are occurring, and 'move2move' is throwing an error in 'm2m_ui.py', causing it to disappear from the module. "

nigd1vr commented 4 months ago

i did this and it said i had it installed but when i start stable diffusion it still says it cant find it do i have to put it in a specific folder

dymension commented 4 months ago

Post your OK message and error message