Skip to content

Commit a6884f6

Browse files
authored
Merge pull request #1171 from YZBPXX/main
Fix issue where LoRa loads on a device different from Dit
2 parents b078666 + 60ac965 commit a6884f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diffsynth/utils/lora/flux.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def guess_alpha(state_dict):
149149
dtype=state_dict_[name].dtype)
150150
else:
151151
state_dict_.pop(name.replace(".a_to_q.", ".proj_in_besides_attn."))
152+
153+
mlp = mlp.to(device=state_dict_[name].device)
152154
if 'lora_A' in name:
153155
param = torch.concat([
154156
state_dict_.pop(name),

0 commit comments

Comments
 (0)