Open dillfrescott opened 1 year ago
colab switched to python 3.8, I'm waiting for a confirmation from multiple users to adjust the colabs
Ah, okay
colab switched to python 3.8, I'm waiting for a confirmation from multiple users to adjust the colabs
Are you saying that you need a certain threshold of people reporting the same error? I was experiencing the same error myself, but after a few times restarting all the cells it switched to a different error (ModuleNotFoundError: No module named 'git')
Of course, that could be a different issue entirely, but I felt it'd be better if I mention it.
My colab is at python3.8 too. Changing the paths for the patches works for me, but there are multiple other dependencies missing.
Can also confirm that I'm getting the same error on my colab.
--------------------------------------------------------------------------- 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...
Came here to say this, got the same problem just now.
For me now appear this error:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-6-3165d779d0bc>](https://localhost:8080/#) in <module>
60 srv= getoutput('cat /content/srvr.txt')
61
---> 62 for line in fileinput.input('/usr/local/lib/python3.7/dist-packages/gradio/blocks.py', inplace=True):
63 if line.strip().startswith('self.server_name ='):
64 line = f' self.server_name = "{srv[8:]}"\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'
I can confirm as well
Here's a list of python modules that I had to install
!pip install GitPython jsonmerge einops clean-fid clip resize_right torchdiffeq lark omegaconf lpips basicsr pytorch_lightning piexif fonts triton
but it now fails like that
WARNING:root:A matching Triton is not available, some optimizations will not be enabled.
Error caught was: module 'triton.language' has no attribute 'constexpr'
/usr/local/lib/python3.8/dist-packages/pytorch_lightning/utilities/distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v1.10.0. You can import it from `pytorch_lightning.utilities` instead.
rank_zero_deprecation(
Traceback (most recent call last):
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/webui.py", line 14, in <module>
from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/modules/sd_samplers.py", line 11, in <module>
from modules import prompt_parser, devices, processing, images
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/modules/processing.py", line 15, in <module>
import modules.sd_hijack
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/modules/sd_hijack.py", line 10, in <module>
import modules.textual_inversion.textual_inversion
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 13, in <module>
from modules import shared, devices, sd_hijack, processing, sd_models, images, sd_samplers
File "/content/gdrive/MyDrive/AI/thelastben_sd/stable-diffusion-webui/modules/images.py", line 16, in <module>
from fonts.ttf import Roboto
ImportError: cannot import name 'Roboto' from 'fonts.ttf' (/usr/local/lib/python3.8/dist-packages/fonts/ttf/__init__.py)
Also getting an error on xformers
"---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named 'wget'
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below."
So I think I got it running by
python3.7
with python3.8
!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.
Can you clarify what you mean by adding the code to the first block? Which block exactly>? The google drive one or the Setting up The Environment one? Just want to make sure I am doing it properly. Got collab pro, so ready to run at high ram. Hoping to get it resolved. Thanks in advance.
Here's where I've added the pip command that installs the dependencies:
Here's where I've added the pip command that installs the dependencies:
Ah, so to confirm that is for running the Automatic1111 Collab. Do we have a solution for the fast-dreambooth collab yet so I can train a model to THEN use in the Automatic? Going to try running automatic now anyways.
I know this may seem obvious - but how do I expand my the cell to view the whole code like in the image above in order to add in the additional code? Right now mine just looks like this. Cant figure out how to expand it like the image above.
I know this may seem obvious - but how do I expand my the cell to view the whole code
It's already expanded, click after the closing brace and press enter on your keyboard for a new line
Thanks so much. I got automatic1111 up and running. Now - does the above technique also work for the fast-dreambooth collab? Have you tried it on that aswell yet?
Thanks again. Excited to continue working on things tonight.
IDK if it will work on dreambooth, but the same approach is most likely to work. In your place I'd do the same (https://github.com/TheLastBen/fast-stable-diffusion/issues/768#issuecomment-1332761995) and then if some python module is missing, I'd add it to the list of modules installed via !pip install <blabla>
I know Ben is working on things in the meantime. So hopefully it will be resolved soon enough regardless. I am curious to try it - but I am not familiar enough with knowing how to fix it if it doesnt work. I'll give it a shot now. (Edit - I cant run two high ram sessions at once. And I dont want to close my automatic at the moment. So going to have to wait to try it, or Ill wait till someone else reports if they do.)
IDK if it will work on dreambooth, but the same approach is most likely to work. In your place I'd do the same (#768 (comment)) and then if some python module is missing, I'd add it to the list of modules installed via
!pip install <blabla>
It's still broken even after this , doesn't do Save_Checkpoint_Every_n_Steps
skips it all together in collab
IDK if it will work on dreambooth, but the same approach is most likely to work. In your place I'd do the same (#768 (comment)) and then if some python module is missing, I'd add it to the list of modules installed via
!pip install <blabla>
It's still broken even after this , doesn't do
Save_Checkpoint_Every_n_Steps
skips it all together in collab
Are there any other ways for us to train models and then at least upload them from our drive into automatic1111? I tired one other collab for training by Shivam but that didnt work right now either.
At this point my strategy for getting fast-dreambooth working is just being patient while Ben works on it.
To confirm - has anyone been able to get fast-dreambooth working yet since the errors?
update the colab it should work now
update the colab it should work now
Trying it out now. When you say Update the Colab - does that just mean reload the page? Want to make sure I am not missing anything. Thanks Ben.
Tried running - get the error under "Setting Up the Environment"
"UsageError: Line magic function %%capture
not found."
the dreambooth colab isn't ready yet, the A1111 is
update the colab it should work now
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-5-e692ee13db33>](https://localhost:8080/#) in <module>
35 if Use_Gradio_Server:
36 share='--share'
---> 37 for line in fileinput.input('/usr/local/lib/python3.8/dist-packages/gradio/blocks.py', inplace=True):
38 if line.strip().startswith('self.server_name ='):
39 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.8/dist-packages/gradio/blocks.py' -> '/usr/local/lib/python3.8/dist-packages/gradio/blocks.py.bak'
Is this fixed?
I can confirm there is no directory when searching for it in the path noted in the stack trace.
Any ideas on how to get this directory back in order?
Guys, in the meanwhile I recommend using this colab: https://github.com/ddPn08/automatic1111-colab
It works fine and has been working as a good replacement till Ben fixes this one! :)
Was able to get the directory set up for python3.8 with gradio.
used pip install gradio
Pretty basic and it gave me the blocks.py file
Now I have this error
While Ben is busy working on this - do we currently have any other way to train a model right now?
Is it possible to do it properly within automatic1111 once it is launched?
In the last cell, add the following right below import fileinput
:
!pip install -q gradio GitPython jsonmerge einops clean-fid resize-right torchdiffeq gfpgan
!pip install -q git+https://github.com/openai/CLIP.git
!pip install -q torchsde transformers facexlib realesrgan lark safetensors omegaconf lpips basicsr pytorch-lightning piexif fonts font-roboto open-clip-torch
That fixed it for me
this is the error output
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 14, in <module>
from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 12, in <module>
from modules import prompt_parser, devices, processing, images
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 15, in <module>
import modules.sd_hijack
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 4, in <module>
import modules.textual_inversion.textual_inversion
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 13, in <module>
from modules import shared, devices, sd_hijack, processing, sd_models, images, sd_samplers
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 18, in <module>
from modules.sd_hijack_inpainting import do_inpainting_hijack, should_hijack_inpainting
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack_inpainting.py", line 6, in <module>
import ldm.models.diffusion.ddpm
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/models/diffusion/ddpm.py", line 24, in <module>
from ldm.models.autoencoder import VQModelInterface, IdentityFirstStage, AutoencoderKL
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/models/autoencoder.py", line 8, in <module>
from ldm.modules.diffusionmodules.model import Encoder, Decoder
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/modules/diffusionmodules/model.py", line 9, in <module>
from ldm.modules.attention import LinearAttention
ImportError: cannot import name 'LinearAttention' from 'ldm.modules.attention' (/content/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/modules/attention.py)
remove the folder sd and use the latest colab
NameError Traceback (most recent call last)
NameError: name 'getoutput' is not defined
rerun the requirements cell
rerun the requirements cell
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 23, in
@webyroki I believe you need to delete the sd folder from your google drive and reinstall everything
@webyroki I believe you need to delete the sd folder from your google drive and reinstall everything
yesterday, it worked fine for me after I deleted sd folder from my google drive and reinstalled everything. But today I tried to connect it again, it is giving me error again
Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module> from modules.call_queue import wrap_queued_call, queue_lock, wrap_gradio_gpu_call File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 7, in <module> from modules import shared, progress File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 9, in <module> import gradio as gr File "/usr/local/lib/python3.8/dist-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/usr/local/lib/python3.8/dist-packages/gradio/components.py", line 32, in <module> from gradio.blocks import Block File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 23, in <module> from gradio import ( ImportError: cannot import name 'queueing' from partially initialized module 'gradio' (most likely due to a circular import) (/usr/local/lib/python3.8/dist-packages/gradio/__init__.py)
You don't need to delete the SD folder anymore just use the latest colab
Facing the error again
Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 16, in <module> from modules import extra_networks_hypernet, ui_extra_networks_hypernets, ui_extra_networks_textual_inversion File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extra_networks_hypernet.py", line 2, in <module> from modules.hypernetworks import hypernetwork File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/hypernetworks/hypernetwork.py", line 10, in <module> import modules.textual_inversion.dataset File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/dataset.py", line 13, in <module> from modules import devices, shared File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 16, in <module> from modules import localization, extensions, script_loading, errors, ui_components, shared_items File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extensions.py", line 10, in <module> extensions_dir = os.path.join(paths.data_path, "extensions") AttributeError: module 'modules.paths' has no attribute 'data_path'
Facing similar error:
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in
does the issue still persist ?
2-3 days ago I had the same problem. I didn't do anything myself, just did "Install/Update AUTOMATIC1111 repo" and "Requirements" as usual before running. FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/dist-packages/gradio/blocks.py' -> '/usr/local/lib/python3.9/dist-packages/gradio/blocks.py.bak'
If you install this, then an error occurs
!pip install -q gradio GitPython jsonmerge einops clean-fid resize-right torchdiffeq gfpgan !pip install -q git+https://github.com/openai/CLIP.git !pip install -q torchsde transformers facexlib realesrgan lark safetensors omegaconf lpips basicsr pytorch-lightning piexif fonts font-roboto open-clip-torch
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in
Any ideas how to solve this problem?
Simply use the latest notebook from the official link
colab switched to python 3.8, I'm waiting for a confirmation from multiple users to adjust the colabs
hello my friend ,how can we use localtunnel again,? we need it
Happens every single time now. Was working an hour ago...