From fccd1ed364e35721c01881684caaad8166294ceb Mon Sep 17 00:00:00 2001 From: AI-Casanova <54461896+AI-Casanova@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:16:33 -0600 Subject: [PATCH] Enable stepwise LoRA (untested) --- modules/processing_callbacks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/processing_callbacks.py b/modules/processing_callbacks.py index 52ea3e575..f6e3c0672 100644 --- a/modules/processing_callbacks.py +++ b/modules/processing_callbacks.py @@ -4,6 +4,7 @@ import time import torch import numpy as np from modules import shared, processing_correction, extra_networks, timer, prompt_parser_diffusers +from modules.lora.networks import network_load p = None debug_callback = shared.log.trace if os.environ.get('SD_CALLBACK_DEBUG', None) is not None else lambda *args, **kwargs: None @@ -63,6 +64,7 @@ def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict = {} time.sleep(0.1) if hasattr(p, "stepwise_lora"): extra_networks.activate(p, p.extra_network_data, step=step) + network_load() if latents is None: return kwargs elif shared.opts.nan_skip: