From f6a0c69f0f90a06feb69d74d7ab4e3837acdc9a8 Mon Sep 17 00:00:00 2001 From: layerdiffusion <19834515+lllyasviel@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:11:12 -0700 Subject: [PATCH] fix ADetailer --- modules/processing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 1398d5b2..de5efe8c 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -490,14 +490,16 @@ class StableDiffusionProcessing: for cache in caches: if cache[0] is not None and cached_params == cache[0]: - modules.sd_hijack.model_hijack.extra_generation_params.update(cache[2]) + if len(cache) > 2: + modules.sd_hijack.model_hijack.extra_generation_params.update(cache[2]) return cache[1] cache = caches[0] with devices.autocast(): cache[1] = function(shared.sd_model, required_prompts, steps, hires_steps, shared.opts.use_old_scheduling) - cache[2] = modules.sd_hijack.model_hijack.extra_generation_params + if len(cache) > 2: + cache[2] = modules.sd_hijack.model_hijack.extra_generation_params cache[0] = cached_params return cache[1]