improve offloading

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-12-25 10:24:02 +00:00
parent 76aae17e6f
commit 0b1e6d2d3c
8 changed files with 47 additions and 15 deletions
+3 -1
View File
@@ -1071,11 +1071,13 @@ def copy_diffuser_options(new_pipe, orig_pipe):
new_pipe.feature_extractor = getattr(orig_pipe, 'feature_extractor', None)
new_pipe.mask_processor = getattr(orig_pipe, 'mask_processor', None)
new_pipe.restore_pipeline = getattr(orig_pipe, 'restore_pipeline', None)
new_pipe.task_args = getattr(orig_pipe, 'task_args', None)
new_pipe.is_sdxl = getattr(orig_pipe, 'is_sdxl', False) # a1111 compatibility item
new_pipe.is_sd2 = getattr(orig_pipe, 'is_sd2', False)
new_pipe.is_sd1 = getattr(orig_pipe, 'is_sd1', True)
add_noise_pred_to_diffusers_callback(new_pipe)
if getattr(new_pipe, 'task_args', None) is None:
new_pipe.task_args = {}
new_pipe.task_args.update(getattr(orig_pipe, 'task_args', {}))
if new_pipe.has_accelerate:
set_accelerate(new_pipe)