Repository navigation
[COLAB] RuntimeError: Failed to import transformers.models.auto because of the following error (look up to see its traceback): module 'sentencepiece._sentencepiece' has no attribute 'delete_ImmutableSentencePieceText_ImmutableSentencePiece' #3121
Description
Activity
Same
@ [HaikenEdge] hey man, our thread from the other day was removed by admin because the issue was fixed, i can confirm that it ran normally (barring the xformers issue) yesterday.!pip install "lightning_utilities==0.8.0" "lightning_fabric==1.9.5"
no longer needed, ran yesterday without itThis however is a new issue and i have no idea what is broken =/
Reacted by Azura-13@ [HaikenEdge] hey man, our thread from the other day was removed by admin because the issue was fixed, i can confirm that it ran normally (barring the xformers issue) yesterday.
It wasn't removed by admin. OP closed it.
oh right, my mistake then, but it ran yesterday (several different times) without it, just the old:
!pip uninstall -y xformers
!pip install -U xformersoh right, my mistake then, but it ran yesterday (several different times) without it, just the old:
!pip uninstall -y xformers
!pip install -U xformersI'll take your word for it. Can't check now because of the error in the OP.
gemini:
This is a critical compatibility issue caused by a breaking change in a recent sentencepiece library update.In recent releases, sentencepiece completely removed legacy C++ wrapper classes, including ImmutableSentencePieceText. However, the older version of transformers (or other dependencies) pre-installed or expected by thelastben's Stable Diffusion notebook is still looking for that specific attribute (delete_ImmutableSentencePieceText_ImmutableSentencePiece), causing the crash during boot.
testing:
!pip install "sentencepiece>=0.1.99,<0.2.0" --force-reinstallhey man im in
!pip install "sentencepiece>=0.1.99,<0.2.0" --force-reinstall
1st new cell!pip uninstall -y xformers
!pip install -U xformers
2nd new cellReacted by HaikenEdge, keith-blue02, putaswdube-ship-it and parapapapapureReacted by HaikenEdge, putaswdube-ship-it and icyjuleshey man im in
!pip install "sentencepiece>=0.1.99,<0.2.0" --force-reinstall 1st new cell
!pip uninstall -y xformers !pip install -U xformers 2nd new cell
Can confirm, seems to be working
Reacted by Azura-13 and keith-blue02hey man im in
!pip install "sentencepiece>=0.1.99,<0.2.0" --force-reinstall 1st new cell
!pip uninstall -y xformers !pip install -U xformers 2nd new cell
Same problem this morning, and yep this worked for me, at least mostly. SD launched, but now I'm getting a 504 gateway timeout error when loading the webpage. Anyone seeing this? Not sure if it's related, but haven't seen this before now.
Update, page loaded after a few restarts, but image gen fails with this error:
Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 74, in f res = list(func(*args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 53, in f res = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img processed = processing.process_images(p) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 847, in process_images res = process_images_inner(p) ^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 1002, in process_images_inner x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 632, in decode_latent_batch sample = decode_first_stage(model, batch[i:i + 1])[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers_common.py", line 76, in decode_first_stage return samples_to_images_tensor(x, approx_index, model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers_common.py", line 58, in samples_to_images_tensor x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 124, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stablediffusion/generative-models/sgm/models/diffusion.py", line 121, in decode_first_stage out = self.first_stage_model.decode(z) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stablediffusion/generative-models/sgm/models/autoencoder.py", line 315, in decode dec = self.decoder(z, **decoder_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1779, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1790, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stablediffusion/generative-models/sgm/modules/diffusionmodules/model.py", line 722, in forward h = self.mid.attn_1(h, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1779, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1790, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stablediffusion/generative-models/sgm/modules/diffusionmodules/model.py", line 260, in forward h_ = self.attention(h_) ^^^^^^^^^^^^^^^^^^ File "/content/gdrive/MyDrive/sd/stablediffusion/generative-models/sgm/modules/diffusionmodules/model.py", line 246, in attention out = xformers.ops.memory_efficient_attention( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/xformers/ops/fmha/__init__.py", line 311, in memory_efficient_attention return _memory_efficient_attention( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/xformers/ops/fmha/__init__.py", line 472, in _memory_efficient_attention return _memory_efficient_attention_forward( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/xformers/ops/fmha/__init__.py", line 491, in _memory_efficient_attention_forward op = _dispatch_fw(inp, False) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/xformers/ops/fmha/dispatch.py", line 142, in _dispatch_fw return _run_priority_list( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/xformers/ops/fmha/dispatch.py", line 83, in _run_priority_list raise NotImplementedError(msg) NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs: query : shape=(1, 16128, 1, 512) (torch.float32) key : shape=(1, 16128, 1, 512) (torch.float32) value : shape=(1, 16128, 1, 512) (torch.float32) attn_bias : <class 'NoneType'> p : 0.0 `fa3F@0.0.0` is not supported because: max(query.shape[-1], value.shape[-1]) > 256 requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new) dtype=torch.float32 (supported: {torch.float16, torch.bfloat16}) operator wasn't built - see `python -m xformers.info` for more info `fa2F@2.5.7-pt` is not supported because: max(query.shape[-1], value.shape[-1]) > 256 dtype=torch.float32 (supported: {torch.float16, torch.bfloat16}) `cutlassF-pt` is not supported because: requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)Update, page loaded after a few restarts, but image gen fails with this error:
Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 74, in f res = list(func(*args, **kwargs))...
fa3F@0.0.0is not supported because:
max(query.shape[-1], value.shape[-1]) > 256
requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
operator wasn't built - seepython -m xformers.infofor more info
fa2F@2.5.7-ptis not supported because:
max(query.shape[-1], value.shape[-1]) > 256
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
cutlassF-ptis not supported because:
requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)Update #2 - "GPU too new issue" confirmed, downgraded runtime to A100 from G4 and runs correctly. This is using the forked repo from markn333 referenced at #3117 though, and removing the 2nd new cel fix listed by Azura-13 above -
!pip uninstall -y xformers
!pip install -U xformers
2nd new cellsince this other repo already has a similar fix that seems to conflict with this.
So not running on my preferred GPU, but running.
Update, page loaded after a few restarts, but image gen fails with this error:
Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 74, in f res = list(func(*args, **kwargs))...
fa3F@0.0.0is not supported because:
max(query.shape[-1], value.shape[-1]) > 256
requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
operator wasn't built - seepython -m xformers.infofor more info
fa2F@2.5.7-ptis not supported because:
max(query.shape[-1], value.shape[-1]) > 256
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
cutlassF-ptis not supported because:
requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)Update #2 - "GPU too new issue" confirmed, downgraded runtime to A100 from G4 and runs correctly. This is using the forked repo from markn333 referenced at #3117 though, and removing the 2nd new cel fix listed by Azura-13 above -
!pip uninstall -y xformers !pip install -U xformers 2nd new cell
since this other repo already has a similar fix that seems to conflict with this.
So not running on my preferred GPU, but running.
If you're running somebody else's repo, you should post your issues there. I'm having no problems running this notebook using the fix by @Azura-13 .
If you're running somebody else's repo, you should post your issues there. I'm having no problems running this notebook using the fix by @Azura-13 .
Right, had the same issue with this repo, that's why i posted here, Tried that repo next, saw the same thing and posted in that thread too. Not sure why I'm getting this if you're not, I figured was about the sentencepiece change but maybe not?
I'll test this one again as well and see if it's still there
If you're running somebody else's repo, you should post your issues there. I'm having no problems running this notebook using the fix by @Azura-13 .
Right, had the same issue with this repo, that's why i posted here, Tried that repo next, saw the same thing and posted in that thread too. Not sure why I'm getting this if you're not, I figured was about the sentencepiece change but maybe not?
I'll test this one again as well and see if it's still there
Also, probably worth mentioning that your previous 504 error was probably from Gradio being down.
If you're running somebody else's repo, you should post your issues there. I'm having no problems running this notebook using the fix by @Azura-13 .
Right, had the same issue with this repo, that's why i posted here, Tried that repo next, saw the same thing and posted in that thread too. Not sure why I'm getting this if you're not, I figured was about the sentencepiece change but maybe not?
I'll test this one again as well and see if it's still thereAlso, probably worth mentioning that your previous 504 error was probably from Gradio being down.
yeah, possible
If you're running somebody else's repo, you should post your issues there. I'm having no problems running this notebook using the fix by @Azura-13 .
Right, had the same issue with this repo, that's why i posted here, Tried that repo next, saw the same thing and posted in that thread too. Not sure why I'm getting this if you're not, I figured was about the sentencepiece change but maybe not?
I'll test this one again as well and see if it's still thereAlso, probably worth mentioning that your previous 504 error was probably from Gradio being down.
yeah, possible
Almost certain. Gradio was down for 3 hours, 6 minutes today based on their own status checker found here:
Hey guys, I'm not having any issues today with the above fix ^^
However if you are having gradio issues you can make an Ngrok account (free) and get a Ngrok_token you can add to the 7th cell Start Sable Diffusion and use Ngrok servers.
Hope This Helps
Got the following error today while running with
in a new cell after the Requirements cell:
Anybody got a fix?