Closed AhmedGit closed 10 months ago
Could you give it another go and let me know if it works?
it's installed correctly now, but on the output level, I don't think it doesn't work. I have this wildcard named "children_animals_minimal", in the webui it generates the image grid attached. but for the ComfyUI it generated strange images "three of them attached" as if it takes the file name as prompt, not its content.
This is the list included in the wild card: fox cat squirrel frog duck sheep owl rat rabbit crocodile
Have a look in the console to see what the prompt is. Where is your wildcard folder? Perhaps it can't find it.
I have used it where wildcards folder is in "ComfyUI/wildcards" or "ComfyUI/custom_nodes/comfyui-dynamicprompts/wildcards", non of them worked. I also removed nested folders and used the wildcard file directly in the wildcard folder root, and didn't work either.
Are you getting any useful output in the console?
This is the wildcard I use, testList containing these values (dog, cat, owl)
Console No values found for wildcard testList Prompt: testList
Should I install any other wildcard custom nodes with it to work like "lordgasmic wildcards" custom node, or "lilly1987 simple wildcard for ComfyUI"?
No, it should just work. To test, I did the following
mkdir ComfyUI/wildcards
children_animals_minimal.txt
into the wildcards folder{red|green|blue} __children_animals_minimal__
see the attached workflow. Can you try those exact steps and let me know if it still doesn't work?
tried it, and this is what I get:
Console:
got prompt
Prompt: green __children_animals_minimal__
(The prompt has the double underscores, but it is not showing here due to formatting of the comment section)
image:
looks like you're missing a double underscore in your prompt, it should be
{red|green|blue} __children_animals_minimal__
but I think you're using:
{red|green|blue} _children_animals_minimal_
[EDIT - just noticed that you updated your comment]
can you show me the contents of ComfyUI/wildcards
I just had a look at your original issue:
ComfyUI\ComfyUI\custom_nodes\comfyui-dynamicprompts_init_.py", line 1, in
from comfy_dynamicprompts.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
ModuleNotFoundError: No module named 'comfy_dynamicprompts'
It looks like you have two ComfyUI directories. The wildcards directory should be parallel to custom_nodes or inside the extension's directory
i.e.
ComfyUI/
├─ wildcards # (option 1)
├─ custom_nodes/
│ ├─ comfui_dynamicprompts/
│ │ ├─ wildcards # (option 2)
Is that perhaps the problem?
I have tried both options. Option 1 doesn't give this error "No values found for wildcard", but doesn't list the values in the file. Option 2 gives the above error in the console.
So, the current configuration is that Im using option 1 with wildcards folder on the same level as custom_nodes folder.
To help me debug, could you please download this file and change the extension to .py
then copy it over comfy_dynamicprompts/nodes/sampler.py
Generate your prompt again and then paste the output you see in the console.
Have tested it. With the default wildcards locations it didn't work, and gave error that wildcards folder is NoneType.
When I created a folder called "wildcards" inside the comfy_dynamicprompts/nodes/wildcards location besides the sampler.py file, it worked, and now dynamic prompt works.
Im using windows 11.
Also please add the option to refresh the wildcards folder, as it doesnot detect newly added files on the fly. I need to restart ComfyUI to read new files added.
thanks.
Thanks for figuring that out. I'll look into why that's happening, perhaps simply search in every directory starting with the root until I find a wildcards folder.
Great efforts. Best wishes.
Closing this issue in favour of #8.
Not working.
ComfyUI\ComfyUI\custom_nodes\comfyui-dynamicprompts__init__.py", line 1, in
from comfy_dynamicprompts.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
ModuleNotFoundError: No module named 'comfy_dynamicprompts'