Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable Diffusion Colab doesn't work, error #2949

Open
Guroexe opened this issue Nov 12, 2024 · 19 comments
Open

Stable Diffusion Colab doesn't work, error #2949

Guroexe opened this issue Nov 12, 2024 · 19 comments

Comments

@Guroexe
Copy link

Guroexe commented Nov 12, 2024

This is an error in the block Start Stable Diffusion tell me how to solve? :

Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/initialize.py", line 16, in imports
import pytorch_lightning # noqa: F401
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/init.py", line 34, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/init.py", line 26, in
from pytorch_lightning.callbacks.pruning import ModelPruning
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/pruning.py", line 30, in
from pytorch_lightning.core.module import LightningModule
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/core/init.py", line 16, in
from pytorch_lightning.core.module import LightningModule
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/core/module.py", line 41, in
from pytorch_lightning.loggers import Logger, LoggerCollection
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/init.py", line 23, in
from pytorch_lightning.loggers.tensorboard import TensorBoardLogger
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/tensorboard.py", line 26, in
from torch.utils.tensorboard import SummaryWriter
File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/init.py", line 12, in
from .writer import FileWriter, SummaryWriter # noqa: F401
File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/writer.py", line 13, in
from tensorboard.compat.proto import event_pb2
File "/usr/local/lib/python3.10/dist-packages/tensorboard/compat/proto/event_pb2.py", line 17, in
from tensorboard.compat.proto import summary_pb2 as tensorboard_dot_compat_dot_proto_dot_summary__pb2
File "/usr/local/lib/python3.10/dist-packages/tensorboard/compat/proto/summary_pb2.py", line 17, in
from tensorboard.compat.proto import tensor_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__pb2
File "/usr/local/lib/python3.10/dist-packages/tensorboard/compat/proto/tensor_pb2.py", line 16, in
from tensorboard.compat.proto import resource_handle_pb2 as tensorboard_dot_compat_dot_proto_dot_resource__handle__pb2
File "/usr/local/lib/python3.10/dist-packages/tensorboard/compat/proto/resource_handle_pb2.py", line 16, in
from tensorboard.compat.proto import tensor_shape_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__shape__pb2
File "/usr/local/lib/python3.10/dist-packages/tensorboard/compat/proto/tensor_shape_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 553, in new
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

@KyotoLyon
Copy link

Same error

@KyotoLyon
Copy link

I used this code one cell before Start Stable Diffusion, and it connected:

!pip install protobuf==3.20.3

I'll test if everything is working correctly.

@BlessedDuelOP
Copy link

I used this code one cell before Start Stable Diffusion, and it connected:

!pip install protobuf==3.20.3

I'll test if everything is working correctly.

It worked, thank you very much, but it doesn't seem to be the definitive solution. I hope they update it, hopefully they can update the 'fast_stable_diffusion_AUTOMATIC1111.ipynb' file, that would be really great 👍 . I also had some issues when trying to install the ADetailer extension :(

@taichihara
Copy link

I had the same problem and thank you for the solution for protobuf problem...
But since then, I have another problem with xformers installation...
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.4.0+cu121 with CUDA 1201 (you have 2.0.1+cu118)
Python 3.10.14 (you have 3.10.12)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
*** Cannot import xformers
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/xformers/checkpoint.py", line 53, in
from torch.utils.checkpoint import SAC_IGNORED_OPS as _ignored_ops # type: ignore
ImportError: cannot import name 'SAC_IGNORED_OPS' from 'torch.utils.checkpoint' (/usr/local/lib/python3.10/dist-packages/torch/utils/checkpoint.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack_optimizations.py", line 160, in <module>
    import xformers.ops
  File "/usr/local/lib/python3.10/dist-packages/xformers/__init__.py", line 12, in <module>
    from .checkpoint import (  # noqa: E402, F401
  File "/usr/local/lib/python3.10/dist-packages/xformers/checkpoint.py", line 57, in <module>
    from torch.utils.checkpoint import _ignored_ops  # type: ignore
ImportError: cannot import name '_ignored_ops' from 'torch.utils.checkpoint' (/usr/local/lib/python3.10/dist-packages/torch/utils/checkpoint.py)

Can someone help me to get out of this "dependency" maze...

@rl2test
Copy link

rl2test commented Nov 13, 2024

After adding

!pip install protobuf==3.20.3

received this warning:
WARNING: The following packages were previously imported in this runtime:
[google]
You must restart the runtime in order to use newly installed versions.

but also this error:

Warning: caught exception 'Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx', memory monitor disabled.

Was able to start Automatic UI, but same error appeared when attempting to generate an image.

Using A100 GPU, but also failed when using L4 and T4

@rl2test
Copy link

rl2test commented Nov 14, 2024

Tested LOLSALT fix. Everything looks good. :)

@ghsldsd
Copy link

ghsldsd commented Nov 14, 2024

I hope can fix it quickly.

@taichihara
Copy link

Sorry,,, what should I do with your prompts, LOLSALT? There are so many lines and I don't see how can I merge them to the main program of TheLastBen...

@ghsldsd
Copy link

ghsldsd commented Nov 15, 2024

I'm waiting because the problem hasn't been solved yet. I hope it's resolved quickly

@LOLSALT
Copy link

LOLSALT commented Nov 16, 2024

Sorry,,, what should I do with your prompts, LOLSALT? There are so many lines and I don't see how can I merge them to the main program of TheLastBen...

fast_stable_diffusion_AUTOMATIC1111.ipynb only changed 6 lines, others are fast_stable_diffusion_Forge.ipynb and fast_stable_diffusion_ReForge.ipynb, which has more improvement, especially ReForge one support using NoobAI-XL V-Pred-0.5-Version.

@ghsldsd
Copy link

ghsldsd commented Nov 16, 2024

The producer here will correct it himself, right?
I don't know about yours

@LOLSALT
Copy link

LOLSALT commented Nov 16, 2024

The producer here will correct it himself, right? I don't know about yours

Yes, the producer here will correct it himself but it may take some times,
about my fork, it's mainly made for myself but feel free to using it.

@LemurianArquetip
Copy link

LemurianArquetip commented Nov 16, 2024

I used this code one cell before Start Stable Diffusion, and it connected:

!pip install protobuf==3.20.3

I'll test if everything is working correctly.

But if I use stable diffusion AUTOMATIC1111 on google collab, where should I use the code?

@HaikenEdge
Copy link

I used this code one cell before Start Stable Diffusion, and it connected:
!pip install protobuf==3.20.3
I'll test if everything is working correctly.

But if I use stable diffusion AUTOMATIC1111 on google collab, where should I use the code?

In a new cell directly above the Start Stable-Diffusion cell.

@htdemirci
Copy link

I used this code one cell before Start Stable Diffusion, and it connected:
!pip install protobuf==3.20.3
I'll test if everything is working correctly.

But if I use stable diffusion AUTOMATIC1111 on google collab, where should I use the code?

In a new cell directly above the Start Stable-Diffusion cell.

I don't know exactly where we need to enter this code.

@htdemirci
Copy link

Can you show it with a visual?

@Mierdas1978
Copy link

Can you show it with a visual?

Refere

In "Start Stable-Diffusion", enter code !pip install protobuf==3.20.3

#@markdown # Start Stable-Diffusion
!pip install protobuf==3.20.3
from IPython.utils import capture
import time
import sys
import fileinput
from pyngrok import ngrok, conf
import re......................

In my case it's works

@htdemirci
Copy link

problem solved thank you

@mdlieber99
Copy link

is the problem still solved for folks? yesterday it broke again for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests