Skip to content

Commit 930a391

Browse files
authored
Merge pull request #1084 from fireicewolf/devel
Fix network multiplier cause crashed while use multi-GPUs
2 parents cf790d8 + 4e67fb8 commit 930a391

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def remove_model(old_ckpt_name):
774774
else:
775775
raise NotImplementedError("multipliers for each sample is not supported yet")
776776
# print(f"set multiplier: {multipliers}")
777-
network.set_multiplier(multipliers)
777+
accelerator.unwrap_model(network).set_multiplier(multipliers)
778778

779779
with torch.set_grad_enabled(train_text_encoder), accelerator.autocast():
780780
# Get the text embedding for conditioning

0 commit comments

Comments
 (0)