one-more-offload

Signed-off-by: vladmandic <mandic00@live.com>
pull/4618/head
vladmandic 2026-02-04 15:05:22 +01:00
parent 2ec79a1807
commit d3dff5df15
1 changed files with 6 additions and 0 deletions

View File

@ -1245,6 +1245,12 @@ def set_diffuser_pipe(pipe, new_pipe_type):
fn = f'{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access
shared.log.debug(f"Pipeline class change: original={cls} target={new_pipe.__class__.__name__} device={pipe.device} fn={fn}") # pylint: disable=protected-access
if shared.opts.diffusers_offload_mode == 'none':
move_model(new_pipe, pipe.device)
else:
set_diffuser_offload(new_pipe, op='model')
pipe = new_pipe
return pipe