mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-24 01:48:13 +00:00
Fix issue where LoRa loads on a device different from Dit
This commit is contained in:
@@ -149,6 +149,8 @@ class FluxLoRALoader(GeneralLoRALoader):
|
|||||||
dtype=state_dict_[name].dtype)
|
dtype=state_dict_[name].dtype)
|
||||||
else:
|
else:
|
||||||
state_dict_.pop(name.replace(".a_to_q.", ".proj_in_besides_attn."))
|
state_dict_.pop(name.replace(".a_to_q.", ".proj_in_besides_attn."))
|
||||||
|
|
||||||
|
mlp = mlp.to(device=state_dict_[name].device)
|
||||||
if 'lora_A' in name:
|
if 'lora_A' in name:
|
||||||
param = torch.concat([
|
param = torch.concat([
|
||||||
state_dict_.pop(name),
|
state_dict_.pop(name),
|
||||||
|
|||||||
Reference in New Issue
Block a user