Skip to content

Commit

Permalink
blocks_to_swap=0 means no swap
Browse files Browse the repository at this point in the history
  • Loading branch information
kohya-ss committed Sep 17, 2024
1 parent 0cbe95b commit a2ad7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flux_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def train(args):

flux.requires_grad_(True)

is_swapping_blocks = args.double_blocks_to_swap is not None or args.single_blocks_to_swap is not None
is_swapping_blocks = args.double_blocks_to_swap or args.single_blocks_to_swap
if is_swapping_blocks:
# Swap blocks between CPU and GPU to reduce memory usage, in forward and backward passes.
# This idea is based on 2kpr's great work. Thank you!
Expand Down

0 comments on commit a2ad7e5

Please sign in to comment.