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

Error when starting Stable Difussion

Open ruisutz opened this issue 11 months ago • 14 comments

I was using the L4 environment but when I wanted to switch to A100 I got this error all cells run without problems but the error appears in the last cell

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/initialize.py", line 17, in imports
    import pytorch_lightning  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/__init__.py", line 34, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/callbacks/__init__.py", line 26, in <module>
    from pytorch_lightning.callbacks.pruning import ModelPruning
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/callbacks/pruning.py", line 30, in <module>
    from pytorch_lightning.core.module import LightningModule
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/core/__init__.py", line 16, in <module>
    from pytorch_lightning.core.module import LightningModule
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/core/module.py", line 41, in <module>
    from pytorch_lightning.loggers import Logger, LoggerCollection
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/loggers/__init__.py", line 24, in <module>
    from pytorch_lightning.loggers.wandb import WandbLogger  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pytorch_lightning/loggers/wandb.py", line 34, in <module>
    import wandb
  File "/usr/local/lib/python3.11/dist-packages/wandb/__init__.py", line 27, in <module>
    from wandb import sdk as wandb_sdk
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/__init__.py", line 4, in <module>
    from .artifacts.artifact import Artifact  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/artifacts/artifact.py", line 36, in <module>
    from wandb.apis.normalize import normalize_exceptions
  File "/usr/local/lib/python3.11/dist-packages/wandb/apis/__init__.py", line 43, in <module>
    from .internal import Api as InternalApi  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wandb/apis/internal.py", line 3, in <module>
    from wandb.sdk.internal.internal_api import Api as InternalApi
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/internal/internal_api.py", line 48, in <module>
    from ..lib import retry
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/lib/retry.py", line 17, in <module>
    from .mailbox import ContextCancelledError
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/lib/mailbox.py", line 102, in <module>
    class _MailboxSlot:
  File "/usr/local/lib/python3.11/dist-packages/wandb/sdk/lib/mailbox.py", line 103, in _MailboxSlot
    _result: Optional[pb.Result]
                      ^^^^^^^^^
AttributeError: module 'wandb.proto.wandb_internal_pb2' has no attribute 'Result'

I already tried a clean install as well

ruisutz avatar Mar 20 '25 17:03 ruisutz

same

Zylixen avatar Mar 20 '25 18:03 Zylixen

Happening to me too

Momo3945 avatar Mar 20 '25 19:03 Momo3945

I have the same symptoms

wave1116 avatar Mar 20 '25 20:03 wave1116

It's not working again. It seems to be the same error as a few days ago. 😯

rori54 avatar Mar 20 '25 20:03 rori54

damn! same problem xD

BlessedDuel avatar Mar 20 '25 21:03 BlessedDuel

Same thing. Yesterday, everything worked

Tauri7752 avatar Mar 20 '25 21:03 Tauri7752

AttributeError: module 'wandb.proto.wandb_internal_pb2' has no attribute 'Result'

Same thing. Yesterday, everything worked

da-art-fantasy avatar Mar 20 '25 21:03 da-art-fantasy

Didn't have time to test yet if downgrading protobuf alone is enough, and upgrading wandb perhaps unnecessary (might even break stuff?), but I went around it with this for now. At least img2img inpainting seemed to work as usual. Run somewhere between Requirements cell and Start Stable-Diffusion cell:

!pip install protobuf==3.20 --no-deps
!pip install wandb==0.16.6 --no-deps

Colab will tell you to restart runtime after this, but no need to restart.

olaviinha avatar Mar 20 '25 21:03 olaviinha

Didn't have time to test yet if downgrading protobuf alone is enough, and upgrading wandb perhaps unnecessary, but I went around it with this for now (run somewhere between Requirements cell and Start Stable-Diffusion cell):

!pip install protobuf==3.20 --no-deps
!pip install wandb==0.16.6 --no-deps

Colab will tell you to restart runtime after this, but no need to restart.

This fix worked for me, thank you very much hopefully there will be a patch soon

ruisutz avatar Mar 20 '25 22:03 ruisutz

that code (protobuf & wandb) gets a1111 to start but then adetailer no longer works. has anyone figured out how to get that to work?

mdlieber99 avatar Mar 21 '25 02:03 mdlieber99

fixed, use the latest notebook or add the following at the end of the dependencies cell (without installing any different wandb):

!sed -i 's@from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F401@@g' /usr/local/lib/python3.11/dist-packages/pytorch_lightning/loggers/init.py !sed -i 's@from .mailbox import ContextCancelledError@@g' /usr/local/lib/python3.11/dist-packages/wandb/sdk/lib/retry.py !sed -i 's@raise ContextCancelledError("retry timeout")@print("retry timeout")@g' /usr/local/lib/python3.11/dist-packages/wandb/sdk/lib/retry.py

TheLastBen avatar Mar 21 '25 07:03 TheLastBen

something about this update leaves adetailer not working. getting this in the terminal:

[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format mediapipe.CalculatorGraphConfig: 68:22: Expected identifier, got:
[-] ADetailer: nothing detected on image 1 with 2nd settings. [libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format mediapipe.CalculatorGraphConfig: 68:22: Expected identifier, got:
[-] ADetailer: nothing detected on image 2 with 2nd settings. INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 4 images in a total of 2 batches.

was working fine until the update

mdlieber99 avatar Mar 21 '25 12:03 mdlieber99

something about this update leaves adetailer not working. getting this in the terminal:

[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format mediapipe.CalculatorGraphConfig: 68:22: Expected identifier, got: [-] ADetailer: nothing detected on image 1 with 2nd settings. [libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format mediapipe.CalculatorGraphConfig: 68:22: Expected identifier, got: [-] ADetailer: nothing detected on image 2 with 2nd settings. INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 4 images in a total of 2 batches.

was working fine until the update

pip install torch==2.1.0 torchvision==0.16.0

Ardogg avatar Mar 24 '25 07:03 Ardogg

Unrelated to adetailer, I too was still getting some (new) errors in the last cell, which the protobuf+wandb upgrade still seemed to solve.

olaviinha avatar Mar 24 '25 08:03 olaviinha