You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean install of the Vladmandic fork installed today, but for some reason I cannot get dynamic thresholding to work for the life of me. Using SD1.5 models in fp32 with the original backend. Tried disabling all extensions, including Controlnet, no dice. I think it has to do with PLMS being set as the default sampler in this fork, and I can't find a way to change it in the config file. At first, I received the same error but it said "Cannot use secondary sampler DDIM with Dynamic Thresholding." Once I removed the DDIM sampler from the list, it switched to PLMS. Is one of the optimizations or another setting responsible for assigning a secondary sampler? This one's got me baffled.
16:44:43-323693 ERROR Running script process batch:
C:\sdnext082023\extensions-builtin\sd-dynamic-thresholding\scripts\dynamic_thresholding.py:
RuntimeError
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ C:\sdnext082023\modules\scripts.py:451 in process_batch │
│ │
│ 450 │ │ │ │ args = p.per_script_args.get(script.title(), p.script_args[script.args_f │
│ > 451 │ │ │ │ script.process_batch(p, *args, **kwargs) │
│ 452 │ │ │ │ s.append(f'{script.title()}:{round(time.time()-t0, 2)}s') │
│ │
│ C:\sdnext082023\extensions-builtin\sd-dynamic-thresholding\scripts\dynamic_thresholding.py:99 in process_batch │
│ │
│ 98 │ │ if orig_latent_sampler_name in ["DDIM", "PLMS"]: │
│ > 99 │ │ │ raise RuntimeError(f"Cannot use secondary sampler {orig_latent_sampler_name} │
│ 100 │ │ if 'UniPC' in (orig_sampler_name, orig_latent_sampler_name) and p.enable_hr: │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
RuntimeError: Cannot use secondary sampler PLMS with Dynamic Thresholding
Version Platform Description
16:07:06-987337 INFO Python 3.10.6 on Windows
16:07:07-039384 INFO Version: 8d97b35 Sun Aug 20 15:51:14 2023 +0200
16:07:07-084425 INFO nVidia CUDA toolkit detected
OKAY, I found the source of the error. I didn't even think about second pass because I hadn't been using it, but even with Second Pass disabled, if its sampler is set to default, it's enough to trip up Dynamic Thresholding. The workaround for now is manually changing the second pass sampler even if you're not using it. Should I close this topic or should there be a solution implemented for this?
sdnext uses "default" as default sampler (both primary and secondary) which means whatever is set as default in loaded model. it doesn't mean that sdnext sets plms, it means that whatever model you loaded had plms as its default sampler. a1111 does not have a concept of default at all.
dynamic thesholding extension exlcludes ddim, plms and unipc as valid samplers as it incorrectly believes that they are not supported for img2img operations. that was the case months ago, but unipc is nowadays fully supported and should be allowed.
dynamic thresholding extension looks at latent sampler (secondary sampler), because internally its working as img2img, just like hires fix. should that be documented by extension? for sure
extension raises "runtime error" which is really bad behavior - it should report error nicely and implement a fallback to primary sampler.
all-in-all, yes, there are several improvements that should be made, but pretty much all are on extension side. i'll update extension issue you've created.
closing here as issue was reported upstream 6 months ago without any progress - it would be a nearly-trivial fix, but if author doesn't want to address it, i cannot keep the issue open here.
Issue Description
Clean install of the Vladmandic fork installed today, but for some reason I cannot get dynamic thresholding to work for the life of me. Using SD1.5 models in fp32 with the original backend. Tried disabling all extensions, including Controlnet, no dice. I think it has to do with PLMS being set as the default sampler in this fork, and I can't find a way to change it in the config file. At first, I received the same error but it said "Cannot use secondary sampler DDIM with Dynamic Thresholding." Once I removed the DDIM sampler from the list, it switched to PLMS. Is one of the optimizations or another setting responsible for assigning a secondary sampler? This one's got me baffled.
16:44:43-323693 ERROR Running script process batch:
C:\sdnext082023\extensions-builtin\sd-dynamic-thresholding\scripts\dynamic_thresholding.py:
RuntimeError
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ C:\sdnext082023\modules\scripts.py:451 in process_batch │
│ │
│ 450 │ │ │ │ args = p.per_script_args.get(script.title(), p.script_args[script.args_f │
│ > 451 │ │ │ │ script.process_batch(p, *args, **kwargs) │
│ 452 │ │ │ │ s.append(f'{script.title()}:{round(time.time()-t0, 2)}s') │
│ │
│ C:\sdnext082023\extensions-builtin\sd-dynamic-thresholding\scripts\dynamic_thresholding.py:99 in process_batch │
│ │
│ 98 │ │ if orig_latent_sampler_name in ["DDIM", "PLMS"]: │
│ > 99 │ │ │ raise RuntimeError(f"Cannot use secondary sampler {orig_latent_sampler_name} │
│ 100 │ │ if 'UniPC' in (orig_sampler_name, orig_latent_sampler_name) and p.enable_hr: │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
RuntimeError: Cannot use secondary sampler PLMS with Dynamic Thresholding
Version Platform Description
16:07:06-987337 INFO Python 3.10.6 on Windows
16:07:07-039384 INFO Version: 8d97b35 Sun Aug 20 15:51:14 2023 +0200
16:07:07-084425 INFO nVidia CUDA toolkit detected
Windows 10, Geforce RTX 3070 TI, Opera GX
URL link of the extension
https://github.com/mcmonkeyprojects/sd-dynamic-thresholding
URL link of the issue reported in the extension repository
mcmonkeyprojects/sd-dynamic-thresholding#63
Acknowledgements
The text was updated successfully, but these errors were encountered: