mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user