sd-dynamic-prompts
sd-dynamic-prompts copied to clipboard
"StopIteration" Console Error when using no prompt (Re: Controlnet models with functions that work w/o a txt prompt)
Hello,
This may be a non-important warning/error but I don't recall seeing it in the past so I wanted to mention. When generating images in TXT2IMG or IMG2IMG w/o a prompt I'm getting seeing the following error in the console. It doesn't not stop/affect generating though.
100%|██████████████████████████████████████████████████████████████████████████████████| 33/33 [00:01<00:00, 22.73it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 33/33 [00:01<00:00, 27.19it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 33/33 [00:01<00:00, 27.22it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 33/33 [00:01<00:00, 27.18it/s]
Total progress: 100%|████████████████████████████████████████████████████████████████| 132/132 [00:05<00:00, 22.24it/s]
*** Error running process: D:\Stable-Diffusion-Webui-Dev\sdxl\stable-diffusion-webui\extensions\a1-sd-dynamic-prompts\scripts\dynamic_prompting.py
Traceback (most recent call last):
File "D:\Stable-Diffusion-Webui-Dev\sdxl\stable-diffusion-webui\modules\scripts.py", line 619, in process
script.process(p, *script_args)
File "D:\Stable-Diffusion-Webui-Dev\sdxl\stable-diffusion-webui\extensions\a1-sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 485, in process
all_prompts, all_negative_prompts = generate_prompts(
File "D:\Stable-Diffusion-Webui-Dev\sdxl\stable-diffusion-webui\extensions\a1-sd-dynamic-prompts\sd_dynamic_prompts\helpers.py", line 93, in generate_prompts
all_prompts = prompt_generator.generate(prompt, num_prompts, seeds=seeds) or [""]
File "D:\Stable-Diffusion-Webui-Dev\sdxl\stable-diffusion-webui\venv\lib\site-packages\dynamicprompts\generators\randomprompt.py", line 71, in generate
prompts.append(next(iter(gen)))
StopIteration
Some controlnet models like Inpainting and the newer "Revision" have functions that guess if no prompt is entered - Thus "no prompt" is a valid entry in those cases.
Same error happens when using the inpaint tab with no prompt. Opening the dynamic prompts section and unchecking the 'Dynamic prompts enabled' box will prevent the error but it's always enabled by default so this error gets rather annoying.
Maybe it could silently fail if there's nothing in the prompt?
This still continues and is ongoing. AFAIK it's just a major annoyance, but I can't keep it from posting this error in the consul unless I disable the extension or roll it back and checkout 39c06b3 which is just prior to when I started noticing this.
Any chance this can be looked at?
Right now, getting it ever generation of a batch upscaling w/ StableSR (no prompt used in IMG2IMG):
-- [Tiled VAE]: the input size is tiny and unnecessary to tile.████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:08<00:00, 2.31it/s] [Tiled VAE]: the input size is tiny and unnecessary to tile. MixtureOfDiffusers Sampling: 0%| | 0/20 [00:10<?, ?it/s] Total progress: 0%|▎ | 20/9960 [00:09<1:21:44, 2.03it/s] [StableSR] Target image size: 1024x1280 | 20/9960 [00:09<1:11:37, 2.31it/s] *** Error running process: D:\stable-diffusion-webui\extensions\1sd-dynamic-prompts\scripts\dynamic_prompting.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 710, in process script.process(p, *script_args) File "D:\stable-diffusion-webui\extensions\1sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 485, in process all_prompts, all_negative_prompts = generate_prompts( File "D:\stable-diffusion-webui\extensions\1sd-dynamic-prompts\sd_dynamic_prompts\helpers.py", line 93, in generate_prompts all_prompts = prompt_generator.generate(prompt, num_prompts, seeds=seeds) or [""] File "D:\stable-diffusion-webui\venv\lib\site-packages\dynamicprompts\generators\randomprompt.py", line 71, in generate prompts.append(next(iter(gen))) StopIteration