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

error running start Stable-Difussion

Open danixen2 opened this issue 1 year ago • 19 comments

this error has occurred when I want to initialize SD

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1146, in _get_module return importlib.import_module("." + module_name, self.name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 83, in from accelerate import version as accelerate_version File "/usr/local/lib/python3.10/dist-packages/accelerate/init.py", line 7, in from .accelerator import Accelerator File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 33, in from .tracking import LOGGER_TYPE_TO_CLASS, GeneralTracker, filter_trackers File "/usr/local/lib/python3.10/dist-packages/accelerate/tracking.py", line 34, in import wandb File "/usr/local/lib/python3.10/dist-packages/wandb/init.py", line 21, in from wandb import sdk as wandb_sdk File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/init.py", line 28, in from .wandb_init import _attach, init File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_init.py", line 39, in from . import wandb_login, wandb_setup File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_login.py", line 19, in from .wandb_settings import Settings File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_settings.py", line 25, in from pydantic import ( ImportError: cannot import name 'computed_field' from 'pydantic' (/usr/local/lib/python3.10/dist-packages/pydantic/init.cpython-310-x86_64-linux-gnu.so)

The above exception was the direct cause of the following exception:

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 17, 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 14, in from pytorch_lightning.callbacks.callback import Callback File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/callback.py", line 25, in from pytorch_lightning.utilities.types import STEP_OUTPUT File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/types.py", line 28, in from torchmetrics import Metric File "/usr/local/lib/python3.10/dist-packages/torchmetrics/init.py", line 14, in from torchmetrics import functional # noqa: E402 File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/init.py", line 77, in from torchmetrics.functional.text.bleu import bleu_score File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/text/init.py", line 30, in from torchmetrics.functional.text.bert import bert_score # noqa: F401 File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/text/bert.py", line 24, in from torchmetrics.functional.text.helper_embedding_metric import ( File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/text/helper_embedding_metric.py", line 26, in from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase File "", line 1075, in _handle_fromlist File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1136, in getattr

danixen2 avatar Dec 18 '24 19:12 danixen2

Exact same issue.

mothman9s avatar Dec 18 '24 19:12 mothman9s

Same problem, it was working fine few hours back...

HexTrue avatar Dec 18 '24 19:12 HexTrue

Seems like a dependency issue.

mzagh98 avatar Dec 18 '24 21:12 mzagh98

temporary fix, add this code before "starst stable diffusion" !pip uninstall wandb press Y to uninstall

!pip install wandb==0.15.12

aionrevenge avatar Dec 18 '24 21:12 aionrevenge

it worked, thanks bro

temporary fix, add this code before "starst stable diffusion" !pip uninstall wandb press Y to uninstall

!pip install wandb==0.15.12

Guroexe avatar Dec 18 '24 22:12 Guroexe

Same ^^

Azura-13 avatar Dec 18 '24 23:12 Azura-13

Same problem but it was solved with the code that he shared, thank you very much <3

BlessedDuelOP avatar Dec 19 '24 02:12 BlessedDuelOP

I was also experiencing the same issue and was confused, but uninstalling it using his code solved the problem. Thank you.

key-key123 avatar Dec 19 '24 06:12 key-key123

一時的な修正として、"starst stable diffusion" の前にこのコードを追加してください 。!pip uninstall wandb アンインストールするには Y を押してください

!pip インストール wandb==0.15.12

あなたのおかげで解決しました! 本当にありがとうございます!!

Nissy0922 avatar Dec 19 '24 10:12 Nissy0922

temporary fix, add this code before "starst stable diffusion" !pip uninstall wandb press Y to uninstall

!pip install wandb==0.15.12

Please tell me where to insert this, I don’t understand. can I get a screenshot?

Mary13-13 avatar Dec 19 '24 19:12 Mary13-13

temporary fix, add this code before "starst stable diffusion" !pip uninstall wandb press Y to uninstall !pip install wandb==0.15.12

Please tell me where to insert this, I don’t understand. can I get a screenshot?

a

Go to the bottom of the cells, hover the mouse cursor over the bottom center of the last cell, you will get this "code" button. Click and add this code -

!pip uninstall wandb !pip install wandb==0.15.12

Then run the cell before running the "Start Stable Diffusion" cell

HexTrue avatar Dec 19 '24 19:12 HexTrue

Thank you!!

Mary13-13 avatar Dec 20 '24 06:12 Mary13-13

I’m curious about why you’re using the computed_field function from version 0.19.x while working with version 0.15.x, instead of using 0.18.x, 0.17.x, or similar versions. Is it for stability? I’m asking purely out of curiosity.

mupersei avatar Dec 20 '24 14:12 mupersei

!pip install pydantic==1.10.7 !pip install wandb==0.15.5 It seems implementation for Flux...

kaitas avatar Dec 31 '24 13:12 kaitas

Sorry. I am using Google Colab and cannot type “Y”. What should I do?

Kaka32793784 avatar Jan 02 '25 05:01 Kaka32793784

!pip install pydantic == 1.10.7 -y

Proceed with installation using the -y option.

mupersei avatar Jan 02 '25 05:01 mupersei

!pip install pydantic ==1.10.7 -y !pip install wandb==0.15.5

Is it OK with you?

!pip uninstall wandb

is not necessary?

Kaka32793784 avatar Jan 02 '25 06:01 Kaka32793784

!pip install pydantic ==1.10.7 -y !pip install wandb==0.15.5

Is it OK with you?

!pip uninstall wandb

is not necessary?

I've been using

!pip uninstall wandb -y

!pip install wandb==0.15.12

in a cell directly above the Start Stable-Diffusion cell and it's been working for me.

HaikenEdge avatar Jan 02 '25 06:01 HaikenEdge

fixed, use the latest notebook

TheLastBen avatar Jan 03 '25 21:01 TheLastBen