mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-06 13:47:06 +00:00
feat: add 'tak' to recognized words and update block swap method to support backward pass
This commit is contained in:
@@ -31,6 +31,7 @@ wn="wn"
|
||||
hime="hime"
|
||||
OT="OT"
|
||||
byt="byt"
|
||||
tak="tak"
|
||||
|
||||
# [files]
|
||||
# # Extend the default list of files to check
|
||||
|
||||
@@ -394,7 +394,7 @@ class HunyuanImageNetworkTrainer(train_network.NetworkTrainer):
|
||||
if self.is_swapping_blocks:
|
||||
# Swap blocks between CPU and GPU to reduce memory usage, in forward and backward passes.
|
||||
logger.info(f"enable block swap: blocks_to_swap={args.blocks_to_swap}")
|
||||
model.enable_block_swap(args.blocks_to_swap, accelerator.device)
|
||||
model.enable_block_swap(args.blocks_to_swap, accelerator.device, supports_backward=True)
|
||||
|
||||
return model, text_encoders
|
||||
|
||||
|
||||
Reference in New Issue
Block a user