-
Notifications
You must be signed in to change notification settings - Fork 272
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
Error loading script: dynamic_prompting.py #146
Comments
This looks like it's related to the transformers library which is installed by auto1111 - do you recall any library upgrades recently. Could you tell me what the output of this command is:
|
Possibly an updated occurred on Dec. 24 because this is the date of the folder and files for the transformers library. The version currently installed is 4.25.1. |
I have the same problem. The above exception was the direct cause of the following exception: Traceback (most recent call last): tensorflow 2.11.0 |
tbh - I'm stumped - none of the changes made should have affected it. To be sure, could you please try an older version of Dynamic Prompts? The easiest way to do that is in the terminal, navigate to extensions/sd-dynamic-prompting and type v1.4.4 is the version before the big release that might be causing the issue. |
git checkout v1.4.4 |
I have created a temporary branch which detects a failure in Magic Prompt and disables it so that you can still use the extension. To use it do the following from the sd-dynamic-prompts directory
Let know if that works for you. |
I fear that the issue is more on the SD Web UI side than yours. I opened a bug report: AUTOMATIC1111/stable-diffusion-webui#6212 |
With that branch, despite the error with the Magic prompt generator, the Dynamic Prompts extension is active in the Web UI, as well as the Wildcards Manager. This will allow me to continue to work on the localization. Unfortunately, I cannot generate any image because of the tensorflow error, which I look for to be resolved soon by the developers, also because it seems that at least another user is experiencing this problem. I will keep you informed of any developments, and thank you for this temporary fix. |
I have come to see if it's only me, but as comments in thread, i'm not alone with this problem. I have the same errors even after |
Now the problem is getting even worst, with Gradio restarting and becoming unresponsive. I cannot even deactivate the extensions now because the UI is stuck. Hopefully the developers will notice this and fix it soon. The application is now unusable. This things happens sometimes. |
Is it exactly the same error? Could you please post a screenshot? From what @Harvester62 says, it looks like it's related to auto1111 but I want to keep an eye on this. |
Fixed it after tensorrt update, had similar messages in the log, But still have issue with wildcard and auto-tag conflict |
Too much of a complicated process, furthermore several other users are facing the same issue which definitely requires the intervention of a developer, possibly the code owner Automatic1111. For the moment I am putting SD Web UI on hold. |
Is this still an issue? |
I resolved that issue simply deleting the venv and rebuilding it, but with the several changes made to the Gradio UI and layout, I cannot exclude future issues. For me, this bug report can be closed. |
No - I don't think that's related. Your problem is documented here: https://github.com/adieyal/sd-dynamic-prompts/#troubleshooting |
@Harvester62 I don't think the debug Donkey is mine :) |
Thank you @adieyal . |
Sorry to reopen this, but I recently faced the same issue and it was caused by a new extension I had active, which was SD-CN-Animation. No idea why it caused this, but after it was disabled, wildcards started working correctly. |
Describe the bug
After latest update, at webui-user.bat start-up the script cannot be loaded and therefore is unavailable in the Web UI.
Current hash: 311354c0bb8930ea939d6aa6b3edd50c69301320
To Reproduce
Start webui-user.bat and check the console error messages. The following is displayed:
Error loading script: dynamic_prompting.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1093, in get_module
return importlib.import_module("." + module_name, self.name)
File "C:\Program Files\Python310\lib\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 "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\pipelines_init.py", line 64, in
from .document_question_answering import DocumentQuestionAnsweringPipeline
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\pipelines\document_question_answering.py", line 29, in
from .question_answering import select_starts_ends
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\pipelines\question_answering.py", line 8, in
from ..data import SquadExample, SquadFeatures, squad_convert_examples_to_features
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\data_init.py", line 31, in
from .processors import (
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\data\processors_init.py", line 19, in
from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\data\processors\glue.py", line 79, in
examples: tf.data.Dataset,
AttributeError: module 'tensorflow' has no attribute 'data'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\stable-diffusion-webui\modules\scripts.py", line 195, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
exec(compiled, module.dict)
File "C:\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py", line 16, in
from prompts.generators import (
File "C:\stable-diffusion-webui\extensions\sd-dynamic-prompts\prompts\generators_init_.py", line 12, in
from .magicprompt import MagicPromptGenerator
File "C:\stable-diffusion-webui\extensions\sd-dynamic-prompts\prompts\generators\magicprompt.py", line 9, in
from transformers import pipeline
File "", line 1075, in _handle_fromlist
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1083, in getattr
module = self._get_module(self._class_to_module[name])
File "C:\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 1095, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
module 'tensorflow' has no attribute 'data'
Also mention which checkboxes have been set. None, because Dynamic Prompts is not available in the Web UI.
Expected behaviour
I worked fine until yesterday.
Additional context
Also the Wildcards Manager is not being loaded, activated and therefore unavailable in the Web UI.
Startup arguments: --xformers --opt-split-attention --disable-safe-unpickle --api --deepdanbooru --allow-code --administrator --medvram --ckptfix --theme dark --cors-allow-origins=http://localhost:5173,https://www.painthua.com
The text was updated successfully, but these errors were encountered: