From 7c9a0f7e0ad212719cd2c6179ae6266d949ea401 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Fri, 5 Jan 2024 12:31:13 -0500 Subject: [PATCH] Fix BasicScheduler issue with Loras. --- comfy_extras/nodes_custom_sampler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/comfy_extras/nodes_custom_sampler.py b/comfy_extras/nodes_custom_sampler.py index bb0ed57b..f02cb5ef 100644 --- a/comfy_extras/nodes_custom_sampler.py +++ b/comfy_extras/nodes_custom_sampler.py @@ -26,9 +26,8 @@ class BasicScheduler: if denoise < 1.0: total_steps = int(steps/denoise) - inner_model = model.patch_model(patch_weights=False) - sigmas = comfy.samplers.calculate_sigmas_scheduler(inner_model, scheduler, total_steps).cpu() - model.unpatch_model() + comfy.model_management.load_models_gpu([model]) + sigmas = comfy.samplers.calculate_sigmas_scheduler(model.model, scheduler, total_steps).cpu() sigmas = sigmas[-(steps + 1):] return (sigmas, )