Comments (28)
Could you give me the example you tried that didn't work? I tried
{square|circle} {blue|red}
{square|circle} __seasons__
__timeofday__ __seasons__
{__timeofday__|__seasons__}
Perhaps you've find an edge case that isn't being handled? Are you using version 0.13.1 btw?
from sd-dynamic-prompts.
I tried my current setup, that's "colorOffset____color colored clothingA color { |with clothingB}{ |, clothingC}, colorOffset color eyes color eyesState , colorOffset____colorHair hair color, hairStyling, hairDescriptor, toneFeeling person".
Then I tried to reduce it to "colorOffset____colorHair hair color, hairStyling, hairDescriptor, toneFeeling" in-case it was too large, and then I reduced it to "hairStyling, hairDescriptor" in-case the combinatorial generation didn't parse "colorOffset____colorHair" well (with the ____).
But it still didn't work. Only after I reduced it to a single wildcard did it generate with combinatorial generation.
Yeah it was with 0.13.1
from sd-dynamic-prompts.
Could you please try 0.13.2? I fixed a bug which may or may not be the cause of your issue.
from sd-dynamic-prompts.
Thanks a lot for the effort to try resolve it.
With the latest update, not sure if there was a bug resolved, however I was able to further discover the issue.
There seems to be some kind of processing happening based on the length of the wildcards, that causes the illusion of the silent freeze. When I was varying the wildcards used to try and test, I found that if I just had my 2 smallest (not including nested potential) wildcards, then it would eventually start running. Changing single lists it appears to delay based on potential outcomes. Adding in another of my longer wildcard lists it still wouldn't start after 10 minutes of waiting.
Also a related minor bug, or possible limitation of this, I have a list that's a few blank lines, then "light-" and "dark-" as modifiers to colors (so that it's more common to not modify the following color prompt, but can possibly modify it to be light or dark). However with "Combinatorial generation" enabled, and 3 batches chosen, it only rendered 2, one light and one dark, ignoring the blank lines.
from sd-dynamic-prompts.
Looking into it - but might take me a few days
from sd-dynamic-prompts.
No worries, good luck with it thank you.
from sd-dynamic-prompts.
Could you please re-test and let me know if it is still an issue? I tried
I love __aesthetics/colours/yellow__ roses and __aesthetics/colours/green__ cheese
with batch count of 50 and batch size of 4.
yellow.txt has 50 rows in it and 66 in green.txt. The generation ran as expected. Not sure if the issue was inadvertently fixed in one of the recent updates.
from sd-dynamic-prompts.
Regrettably it's still an issue.
Building off your example, that works no problem, but if you adjust to
"I love aesthetics/colours/yellow roses and aesthetics/colours/green cheese and aesthetics/colours/red apples"
you can see it take more time before it begins generating the images.
Then if you adjust to
"I love aesthetics/colours/yellow roses and aesthetics/colours/green cheese and aesthetics/colours/red apples and aesthetics/colours candy"
after 10 minutes it hadn't started generating any images still so I gave up on that.
And my prompts use a lot more wildcards, so it's impossible for them to work with combinatorial generation atm.
from sd-dynamic-prompts.
same problem here.
I think is due to wildcards file lenght. i've 3 files with 300 lines each and it freeze.
I've try with 3 different file trimmed (10-15) lines and it work as intended
1 long + 2 short = work
2 long + 1 short = freeze
Edit: while i'm writing sd start generate, so i think it just take too much time to combine random choice (it takes longer to create prompt than to generate images)
the last try (2long+1short) takes 9 minutes, I dare to think how long it will take with more wildcard files
FYI my prompt is: photo of a __gender__
__Job__
in __Location__
by __photographer__
from sd-dynamic-prompts.
Could you please test 0.23.1?
from sd-dynamic-prompts.
Could you please test 0.23.1?
can i download .zip and just overwrite my files? or should update by UI ?
from sd-dynamic-prompts.
either should work - let me know if it doesn't.
from sd-dynamic-prompts.
Could you please test 0.23.1?
Speed problem resolved, i've try with 5 long wildcard files and it was very fast.... good job but
Subsequent runs use the same data of previous batch job, (same job, same location, same photographer)
and minor bug i found:
when u click here to fix
... which I guess should update the list of wildcards avaible, do nothing
from sd-dynamic-prompts.
Subsequent runs use the same data of previous batch job, (same job, same location, same photographer)
Since it's combinatorial, there should be no randomness, i.e. the same prompt should give you the same output. What would you expect to see?
when u click here to fix... which I guess should update the list of wildcards avaible, do nothing
No, it's a hacky way to fix the situation where the wildcards accordions don't open. It's something I plan to fix in future.
With regards to updating the wildcards list, that is also something I'm planning on looking into in a future release.
from sd-dynamic-prompts.
Since it's combinatorial, there should be no randomness, i.e. the same prompt should give you the same output. What would you expect to see?
maybe i misunderstood how combinatorial work.
for example i run a 2 batch size with 2 combinatorial bacth and click generate. the result are 4 images, 2 of a Doctor in airport and 2 of a taxi driver in mountain.
If i click Generate again i got again 2 doctor in airport and 2 driver in mountain, what i expect is 2 different job in 2 different location
from sd-dynamic-prompts.
Looks like there may be an improvement for speed, but still can't handle my own prompts, and multiple bugs.
Testing based on the previous I love __aesthetics/colours/yellow__ roses and __aesthetics/colours/green__ cheese and __aesthetics/colours/red__ apples and __aesthetics/colours candy__, __aesthetics/colours/yellow__ roses and __aesthetics/colours/green__ cheese and __aesthetics/colours/red__ apples and __aesthetics/colours candy__
It does take only a brief moment, but that's with 1 batch count. If you increase batch count, the time seems to increase exponentially. At 4 it still completed after a bit, but 6 'froze' and I had to restart everything.
Bug -1: When I did '4' batches, even after it took longer to start, it only actually completed 1 item.
Bug -2: That 1 item generated, had used the exact prompt above-with underlines etc, not the actual wildcards that showed up when unticking 'Combinatorial generation'
@izacca You might be referring to #26 , you'll need to edit a file manually atm to unlink the wildcard outcomes from the seeds like I do.
from sd-dynamic-prompts.
I'm not sure how it builds this combinatorial generation at all so this input may not be too valuable, but in-case I was wondering if the method it uses to create the combinations could be something like a list of INTs for each wildcard (random equal to the size of your wildcard) in your prompt that makes sure not to match a previous set of INTs, equal to the batch size. Then it just grabs the line from each INT value as it goes through the prompt for each generation?
At the moment it at least feels like it's trying to build all combinatorial possibilities before it starts which can be impractical with more wildcards.
from sd-dynamic-prompts.
@izacca You might be referring to #26 , you'll need to edit a file manually atm to unlink the wildcard outcomes from the seeds like I do.
no, even changing the prompt I always get the doctor and the taxidriver
from sd-dynamic-prompts.
@izacca You might be referring to #26 , you'll need to edit a file manually atm to unlink the wildcard outcomes from the seeds like I do.
no, even changing the prompt I always get the doctor and the taxidriver
Is your seed the same though. That's what caused me to keep getting the same wildcards. You need to edit "extensions\sd-dynamic-prompts\prompts\constants.py", changing "UNLINK_SEED_FROM_PROMPT" to True
Otherwise it may be the case that combinatorial generation goes through it top-down, instead of randomly from possible options as suggested above and you imagined it working.
from sd-dynamic-prompts.
Is your seed the same though. That's what caused me to keep getting the same wildcards. You need to edit "extensions\sd-dynamic-prompts\prompts\constants.py", changing "UNLINK_SEED_FROM_PROMPT" to True
tried with fixed and random seed but always doctors and drivers.
i'll try edit that file, thank you
from sd-dynamic-prompts.
@SwiftIllusion I couldn't properly reproduce what you saw, but I re-wrote the combinatorial generation using a queue instead of recursion which should make it more robust.
Here are my settings:
Prompt: I love __aesthetics/colours/yellow__ roses and __aesthetics/colours/green__ cheese and __aesthetics/colours/red__ apples and __aesthetics/colours/blue__ candy
Batch count: 50
Batch size: 4
Combinatorial Generation: 6
The prompt generation took around a second or so for 1200 prompts.
from sd-dynamic-prompts.
maybe i misunderstood how combinatorial work.
for example i run a 2 batch size with 2 combinatorial bacth and click generate. the result are 4 images, 2 of a Doctor in airport and 2 of a taxi driver in mountain.
If i click Generate again i got again 2 doctor in airport and 2 driver in mountain, what i expect is 2 different job in 2 different location
Assuming your Batch count
and Batch size
are large enough, the tool will generated every possible job and location combination (say 3 jobs and 5 locations then a total of 15 possible prompts). If Batch count * Batch size
is less than that, say 3 * 2 = 6, then you would only get the first 6 of the 15 prompts. This upper bound is needed to avoid a combinatorial explosion, as is the case with what @SwiftIllusion is reporting.
If you want random results, you shouldn't use combinatorial but rather just the standard mode. That way it will generate as many random prompts as you want (again Batch count * Batch size
).
UNLINK_SEED_FROM_PROMPT
is only relevant for random generation, not combinatorial. By default, if you fix the seed, then that seed is used for both the image generation and the prompt generation. That means that re-generating with the same seed will result in exactly the same output. If you set UNLINK_SEED_FROM_PROMPT
to True, then even if you fix the seed, the prompts will still be randomly generated.
Btw, you don't have to edit constants.py manually anymore. There is a checkbox in advanced settings which you should use instead.
from sd-dynamic-prompts.
then you would only get the first 6 of the 15 prompts
now i understand, but why not chose random 6 of 15 ? it might be a good idea don't you think?
also could be useful to write that 15 possible combinations in .txt file to be parsed by prompt_from_file script
from sd-dynamic-prompts.
I've added a shuffle to combinatorial generation so that it generates a random subset of prompts if the total number of prompts > Batch size * Batch count
.
from sd-dynamic-prompts.
Sorry that 'bug' was a result of the prompt breaking with combinatorial batches because it couldn't find __aesthetics/colours candy__
(the underline was after candy there accidentally)-but still completed the first prompt.
Nice work, my prompt now can just get done after a minute. Adding colours brings it up to about 2 minutes, then again brings it up to about 4 minutes. General usage it'll work no problem.
I didn't get a shuffled generation though-same wildcards used-when I tried, with seed fixed and advanced option unlock from seed.
from sd-dynamic-prompts.
I've added a shuffle to combinatorial generation so that it generates a random subset of prompts if the total number of prompts >
Batch size * Batch count
.
Are you talking about this line?
This line leads to the random order of prompts when I use combinatorial generation. The prompt order is not consistent through SD UI launches, and it also changes after small edits to the prompt text.
For example, I use prompt {red|blue} {sofa|chair}
with 'Batch count: 4' and Fixed seed
and combinatorial generation. It can give me different order of the prompts if I close SD and launch it again. It also gives a different order most of the time if I use '{red|blue} {sofa
|chair}' (with space after sofa) for the first generation, and '{red|blue} {sofa|chair}' (without extra space) for the second generation.
I use the extension as a replace for the 'Prompt matrix' script. I study how different tokens affects the final result, compare these variants through different seeds and Sampling methods (noise generation algorithms). So inconsistent order of prompts in combinatorial generation is not acceptable for me, as I compare grids between each other (each grid can contains 16 images for example).
I just commented this line in local folder, so it's not a big problem for me. But I think it would be good if there was a setting for this (if someone needs nondeterministic results).
from sd-dynamic-prompts.
That was my view as well, but I received this request so many times that I implemented it this way. I think that the unlink seed from prompt checkbox should apply to all generators, not just the random generator.
from sd-dynamic-prompts.
Closing this issue since it's so old and the extension has gone through many changes since. If there is anything outstanding, please open a new issue.
from sd-dynamic-prompts.
Related Issues (20)
- support search wildcards in other location like localizations do
- [BUG] Fails to parse YAML options that start with { HOT 5
- hope can only do `dp_write_raw_template` when prompt is changed
- Dynamic prompts no longer working, need help parsing error message HOT 2
- Replace parser with something more lenient HOT 1
- Variables not support `,` Comma , `(` parenthesis
- Should not fail all wildcards when one of is invalid HOT 2
- Wildcards are just failing to unpack
- Enhancement: enrich csv export
- not support wildcards as sep
- Extension takes more time than image generation between each batch HOT 3
- Error completing request? HOT 1
- Combinatorial generation batch > 1 acting wrong HOT 4
- support new SYNTAX something like `__&wildcard__` in yaml
- popup error message
- save wildcards hash in pnginfo HOT 1
- bug: min range not work HOT 1
- Nested Wildcards
- bug:Using the Choosing Multiple Values function with dynamic prompts in ComfyUI does not work.
- Unable to compare LORA strenghs - Only first value used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd-dynamic-prompts.