From 7a651efd4dab281acf8dc66200ade8620c5138dd Mon Sep 17 00:00:00 2001 From: Kohya S <52813779+kohya-ss@users.noreply.github.com> Date: Fri, 12 Sep 2025 22:00:41 +0900 Subject: [PATCH] feat: add 'tak' to recognized words and update block swap method to support backward pass --- _typos.toml | 1 + hunyuan_image_train_network.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_typos.toml b/_typos.toml index 362ba8a6..bf0292e5 100644 --- a/_typos.toml +++ b/_typos.toml @@ -31,6 +31,7 @@ wn="wn" hime="hime" OT="OT" byt="byt" +tak="tak" # [files] # # Extend the default list of files to check diff --git a/hunyuan_image_train_network.py b/hunyuan_image_train_network.py index 291d5132..40c1f2fe 100644 --- a/hunyuan_image_train_network.py +++ b/hunyuan_image_train_network.py @@ -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