Skip to content

Commit 9d9cdcf

Browse files
committed
Make sure all non-ramtorch parts of network on GPU
1 parent c0e2b2b commit 9d9cdcf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

train_network.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,8 @@ def train(self, args):
11201120
network = network.to("cpu")
11211121
logger.info("Applying RamTorch to network/lora.")
11221122
network = apply_ramtorch_to_module(network, "network/lora", accelerator.device)
1123+
# Make sure the rest of the network is moved to the accelerator.device
1124+
network = network.to(accelerator.device)
11231125

11241126
if args.gradient_checkpointing:
11251127
if args.cpu_offload_checkpointing:

0 commit comments

Comments
 (0)