adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
2.02k stars 261 forks source link

Extension takes more time than image generation between each batch #785

Closed robitronathon closed 4 months ago

robitronathon commented 4 months ago

I've been using wildcards for a while, and for the past few months there has been a long pause between each generation. After disabling the extension the issue goes away, so it is definitely sd-dynamic-prompt's fault. Is there some setting to fix this? it seems like a ridiculously long time for a python script to pull some numbers then write a string based on that. I'll note that i do use compound wildcards, as in wildcards that call other wildcards, but even when i am only using wildcards that don't do that, I still have the 20 second or so pause every single batch. I really like the utility of this extension, but functionally doubling my generation times is really annoying.

robitronathon commented 4 months ago

I've figured out the main issue. The problem is that I use LoRAs in my wildcards. This definitely explains the issue a lot better, But is pretty unavoidable for how i use some wildcards. is there a good way to deal with this? ideally have it cache many LoRAs at once to be able to toggle them on and off instantly, but I would also settle for having a way to schedule prompts, like having 100 batches with these LoRAs, then 100 with some different LoRAs etc all set up automatically for over night generations.

robitronathon commented 4 months ago

going to settings and changing "Number of Lora networks to keep cached in memory" to 99 or something seems to work, problem solved.

akx commented 4 months ago

Glad you found a solution! 👍