mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
refactor: use model.clone() instead of copy.deepcopy() for model duplication, see #733
This commit is contained in:
@@ -103,7 +103,7 @@ def nunchaku_load_lora(model, lora_name, lora_strength):
|
|||||||
|
|
||||||
# Save the transformer temporarily
|
# Save the transformer temporarily
|
||||||
model_wrapper.model = None
|
model_wrapper.model = None
|
||||||
ret_model = copy.deepcopy(model) # copy everything except the model
|
ret_model = model.clone()
|
||||||
ret_model_wrapper = ret_model.model.diffusion_model
|
ret_model_wrapper = ret_model.model.diffusion_model
|
||||||
|
|
||||||
# Restore the model and set it for the copy
|
# Restore the model and set it for the copy
|
||||||
|
|||||||
Reference in New Issue
Block a user