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.04k stars 262 forks source link

Dynamic prompts doesn't work with Hires and batch at the same time #557

Open DannyDsds opened 1 year ago

DannyDsds commented 1 year ago

It works with one at a time but when I try to go for batch it renders the first image as it should but gives an error for the second one and cuts the speed in half and gives me an image of a random car:

16:01:45-584733 ERROR Running script process: F:\Games\AI\Vlad\automatic\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py: AttributeError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ F:\Games\AI\Vlad\automatic\modules\scripts.py:406 in process │ │ │ │ 405 │ │ │ │ args = p.per_script_args.get(script.title(), p.script_args[script.args_f │ │ > 406 │ │ │ │ script.process(p, *args, **kwargs) │ │ 407 │ │ │ │ s.append(f'{script.title()}:{round(time.time()-t0, 2)}s') │ │ │ │ F:\Games\AI\Vlad\automatic\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py:400 in process │ │ │ │ 399 │ │ if hr_fix_enabled and hasattr(p, "all_hr_prompts"): │ │ > 400 │ │ │ original_hr_prompt = _get_effective_prompt(p.all_hr_prompts, p.hr_prompt) │ │ 401 │ │ │ original_negative_hr_prompt = _get_effective_prompt( │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ AttributeError: 'StableDiffusionProcessingTxt2Img' object has no attribute 'hr_prompt'

DannyDsds commented 1 year ago

Without Hires, it works as intended but when I turn on Hires it gives me the error. I tried to fix it on my own for 4 hours but ended up here.

DannyDsds commented 1 year ago

Figured it out, it has issues with the 'adetailer' and 'dddetailer', sigh, I don't want to go back to A1111 but I have to.

brknsoul commented 1 year ago

@DannyDsds This has been fixed for aDetailer/ddetailer, but not for Dynamic Prompts yet.

SD.Next changed a few things around in preparation for SDXL refiner. Hires Fix is now called Second Pass, so a few things got changed.