Skip to content

Commit

Permalink
Fix model merging issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Sep 20, 2024
1 parent e7d4782 commit 70a708d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def calculate_weight(patches, weight, key, intermediate_dtype=torch.float32):
weight *= strength_model

if isinstance(v, list):
v = (calculate_weight(v[1:], v[0].clone(), key, intermediate_dtype=intermediate_dtype), )
v = (calculate_weight(v[1:], comfy.model_management.cast_to_device(v[0], weight.device, intermediate_dtype, copy=True), key, intermediate_dtype=intermediate_dtype), )

if len(v) == 1:
patch_type = "diff"
Expand Down

0 comments on commit 70a708d

Please sign in to comment.