h43lb1t0 / SD-WebUI-BatchCheckpointPrompt

Test a base prompt with different checkpoints and for the checkpoints specific prompt templates
MIT License
55 stars 3 forks source link

Added checkbox "Loop through prompts (if fewer prompts than models)".… #43

Closed RandyHaylor closed 1 year ago

RandyHaylor commented 1 year ago

Added checkbox "Loop through prompts (if fewer prompts than models). If unchecked, model and prompt list must be the same length.

The base behavior is identical, but if this box is checked, it will just loop through the one or more prompts as needed to satisfy the prompt list and run the generations. This will let me just enter one prompt and test it against a bunch of models.

An interesting idea could be an iterator tag like [i=1++] that the code would recognize and increment in the loop (as in if you have a bunch of lora training checkpoints to compare). I might do that soon, as that's something I want to automate. Easy way to quickly find out when a lora is overtrained without having to manually run a bazillion generations manually...

h43lb1t0 commented 1 year ago

It seems like some people want this. Okay. But a few things:

and for future PRs please use a dev branch :)

RandyHaylor commented 1 year ago

Cool! I actually just set up a cool iterator from the prompt. What I added here is just a check box to allow a lower number of prompts to repeat.

I'll put this and that in a more cleaned up push.

I've been wanting this sort of functionality and I'm stoked your script is such a good platform.

h43lb1t0 commented 1 year ago

Hi, i've changed a few things in the BatchParams file. Nothings that will brake your new stuff, but probably won't merge without a conflict. Would be nice if you could switch to the dev branch and copy your changes/solve the merge conflict.

RandyHaylor commented 1 year ago

Sounds good! I got caught up in setting up a small parser for some basic functions. My footprint in your code is very small so it will be fine no matter what.

h43lb1t0 commented 1 year ago

is this ready to merge?

RandyHaylor commented 1 year ago

https://github.com/RandyHaylor/SD-WebUI-BatchCheckpointPrompt/tree/dev

I added a bit more functionality in. Also adds custom iterator via a basic scripting tag in the prompt i.e. [0.2,myIncrementor,+=,0.05]

Lets not apply this one as my dev branch also has this change and they affect some of the same lines.

I'll see if I can get another pull request set up.

h43lb1t0 commented 1 year ago

I've cloned your dev branch. I can't get any of your functions to work. Also if enable_iterators: process_variables_from_prompts(prompts) return a list, that is not used?

RandyHaylor commented 1 year ago

process_variables_from_prompts(prompts) is a function that looks for custom tags to process as iterators.

have a look at the pull request I just made, I synced first then re-applied my additions. It was working for me today. the pull request has more details and examples.

way past my bedtime btw, logging off for the night.

RandyHaylor commented 1 year ago

I've cloned your dev branch. I can't get any of your functions to work.

Also `if enable_iterators:

        process_variables_from_prompts(prompts)` return a list, that is not used?

Ah prompts is a reference to an object and it updates it. I agree it would be better coding to edit a copy and return a reference to that, but it does work to edit the prompt collection.