fast-stable-diffusion: Error when trying to run notebook all of a sudden

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-12-55b102f3c5f0>](https://localhost:8080/#) in <module>
     44 if Use_Gradio_Server:
     45   share='--share'
---> 46   for line in fileinput.input('/usr/local/lib/python3.7/dist-packages/gradio/blocks.py', inplace=True):
     47     if line.strip().startswith('self.server_name ='):
     48         line = '            self.server_name = server_name\n'

1 frames
[/usr/lib/python3.8/fileinput.py](https://localhost:8080/#) in _readline(self)
    340                     pass
    341                 # The next few lines may raise OSError
--> 342                 os.rename(self._filename, self._backupfilename)
    343                 self._file = open(self._backupfilename, self._mode)
    344                 try:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/gradio/blocks.py' -> '/usr/local/lib/python3.7/dist-packages/gradio/blocks.py.bak'

Happens every single time now. Was working an hour ago…

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 47 (10 by maintainers)

Most upvoted comments

colab switched to python 3.8, I’m waiting for a confirmation from multiple users to adjust the colabs

So I think I got it running by

  • using colab’s search and replace (menu edit), I replaced all occurrences of python3.7 with python3.8
  • then in the first code block I added the following to deal with the missing dependencies:
!pip install GitPython jsonmerge einops clean-fid clip resize_right torchdiffeq lark omegaconf lpips basicsr pytorch_lightning piexif fonts font-roboto triton==2.0.0.dev20221120 transformers facexlib gfpgan realesrgan

It needs a high system RAM runtime in colab but now it runs fine.

rerun the requirements cell

Traceback (most recent call last): File “/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py”, line 23, in <module> import modules.extras File “/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extras.py”, line 20, in <module> from modules.ui import plaintext_to_html File “/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py”, line 23, in <module> from modules.ui_components import FormRow, FormGroup, ToolButton, FormHTML ImportError: cannot import name ‘FormHTML’ from ‘modules.ui_components’ (/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_components.py)

update the colab it should work now