From 37f005a5d2fc8fb4a34b941a20c67ecd14c3d323 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Sat, 8 Aug 2026 03:50:00 +0100 Subject: [PATCH] fix(offload): skip accelerator pre-moves of on-demand components Tab runners pre-move the vae module to the gpu before generation, which parks an on-demand component on the accelerator for the whole denoise. Moves of a stamped module toward the accelerator now return early; the entry bridge onloads it when its encode or decode runs. --- modules/sd_models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/sd_models.py b/modules/sd_models.py index e1b819576..ff834aa6e 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -231,6 +231,8 @@ def move_model(model, device=None, force=False): if model is None or device is None: return + if getattr(model, 'sdnext_ondemand', False) and device == devices.device: # on-demand components onload at their entry points instead of pre-moves + return if hasattr(model, 'pipe'): move_model(model.pipe, device, force)