faster model loading for weight update

This commit is contained in:
Quentin HENRY 2025-04-22 17:29:41 +02:00 committed by GitHub
parent 82a973c043
commit 6172e16572
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -961,7 +961,7 @@ def reload_model_weights(sd_model=None, info=None, forced_reload=False):
if sd_model is not None: if sd_model is not None:
sd_unet.apply_unet("None") sd_unet.apply_unet("None")
send_model_to_cpu(sd_model) send_model_to_device(sd_model)
sd_hijack.model_hijack.undo_hijack(sd_model) sd_hijack.model_hijack.undo_hijack(sd_model)
state_dict = get_checkpoint_state_dict(checkpoint_info, timer) state_dict = get_checkpoint_state_dict(checkpoint_info, timer)