sd-dynamic-prompts icon indicating copy to clipboard operation
sd-dynamic-prompts copied to clipboard

Wildcard tab not showing

Open nskn1031 opened this issue 1 year ago • 9 comments

Nice to meet you, I always use it.

The wildcard tab is not displayed and the wildcard functionality is not enabled.

I tried troubleshooting item 3, but although there was an update, there was no particular change.

If you enter aaa at the prompt, it will list the text written inside aaa.txt, so it seems that it is not completely read. However, even if it is generated in this state, only aaa is displayed in the INFO of the output illustration.

There was no error notation on the console when outputting.

I was able to use it until the other day, so please let me consult. Thank you.

nskn1031 avatar May 28 '23 05:05 nskn1031

Are there any errors in the webui's console output?

Do you have other extensions enabled - and if you do, can you try and disable them to see if one of them is conflicting with this extension?

akx avatar May 28 '23 08:05 akx

thank you. There were no errors on the console.

I disabled everything except dynamicprompt like this and rebooted, but it didn't show up. image

nskn1031 avatar May 28 '23 08:05 nskn1031

Okay, can you then check your WebUI -> Preferences -> User Interface, to make sure the Wildcard Manager tab hasn't been hidden by Hidden UI Tabs?

image

akx avatar May 28 '23 09:05 akx

Mine's just dissapeared today on restarting my client too - tried reinstalling the extension and just updating requirements - b88e1159

Error loading script: dynamic_prompting.py
Traceback (most recent call last):
  File "E:\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "E:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py", line 3, in <module>
    from sd_dynamic_prompts.dynamic_prompting import Script
  File "E:\stable-diffusion-webui\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 12, in <module>
    from dynamicprompts.generators.promptgenerator import GeneratorException
  File "E:\stable-diffusion-webui\venv\lib\site-packages\dynamicprompts\generators\__init__.py", line 7, in <module>
    from dynamicprompts.generators.jinjagenerator import JinjaGenerator
  File "E:\stable-diffusion-webui\venv\lib\site-packages\dynamicprompts\generators\jinjagenerator.py", line 14, in <module>
    from dynamicprompts.jinja_extensions import DYNAMICPROMPTS_FUNCTIONS, PromptExtension
  File "E:\stable-diffusion-webui\venv\lib\site-packages\dynamicprompts\jinja_extensions.py", line 8, in <module>
    from jinja2 import Environment, pass_environment
ImportError: cannot import name 'pass_environment' from 'jinja2' (E:\stable-diffusion-webui\venv\lib\site-packages\jinja2\__init__.py)

tenabraex avatar May 28 '23 10:05 tenabraex

@tenabraex That's a slightly different error, and it means your environment has an incompatible version of Jinja2 installed. Try pip install -U jinja2 (though that may break some other extension that expects Jinja2 older than 3.0).

akx avatar May 28 '23 10:05 akx

@tenabraex That's a slightly different error, and it means your environment has an incompatible version of Jinja2 installed. Try pip install -U jinja2 (though that may break some other extension that expects Jinja2 older than 3.0).

Ah cheers that makes sense, something else I updated must have broken it.

BunnyViking avatar May 28 '23 12:05 BunnyViking

Okay, can you then check your WebUI -> Preferences -> User Interface, to make sure the Wildcard Manager tab hasn't been hidden by Hidden UI Tabs?

image

Hidden UI Tabs were blank and there were no wildcard items in the dropdown that appeared when selected.

nskn1031 avatar May 28 '23 19:05 nskn1031

@tenabraex That's a slightly different error, and it means your environment has an incompatible version of Jinja2 installed. Try pip install -U jinja2 (though that may break some other extension that expects Jinja2 older than 3.0).

Had dynamic prompts not working myself with jinja errors. I did the pip install to no avail. I finally figured out the culprit is jinja 2.11-something was installed and that didnt work with dynamic prompts. replaced it with jinja 2-3.1.2 and it worked again

perstale avatar May 29 '23 12:05 perstale

It looks like i also have the same error, it is not showing. First installing the extension. No jinja error, just cannot find the module

Error loading script: dynamic_prompting.py Traceback (most recent call last): File "C:\Users\cyril\Auto1111\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Users\cyril\Auto1111\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\cyril\Auto1111\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py", line 3, in <module> from sd_dynamic_prompts.dynamic_prompting import Script File "C:\Users\cyril\Auto1111\stable-diffusion-webui\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 8, in <module> import dynamicprompts ModuleNotFoundError: No module named 'dynamicprompts'

let me know - thank you

trendland avatar May 29 '23 17:05 trendland

@trendland that means the requirements for the extension aren't installed. They should be automatically installed when the webui starts, but follow the instructions in https://github.com/adieyal/sd-dynamic-prompts/issues/441#issuecomment-1559051108 otherwise.

akx avatar May 29 '23 19:05 akx

I also have the same problem, how should I solve it?

bboyban avatar May 30 '23 05:05 bboyban

Have a look at @aks's comment.

adieyal avatar May 30 '23 07:05 adieyal

Well, it looks like the Inpaint Anything extension uses a different version of Jinja which breaks Dynamic Prompts.

FLi79Za avatar May 30 '23 08:05 FLi79Za

We now import Jinja things only when needed, which should unbreak things: https://github.com/adieyal/dynamicprompts/pull/92

akx avatar Nov 10 '23 08:11 akx