@@ -327,22 +327,25 @@ def diffusers_saver(out_dir):
327327
328328
329329def add_sdxl_training_arguments (parser : argparse .ArgumentParser , support_text_encoder_caching : bool = True ):
330- parser .add_argument (
331- "--cache_text_encoder_outputs" , action = "store_true" , help = "cache text encoder outputs / text encoderの出力をキャッシュする"
332- )
333- parser .add_argument (
334- "--cache_text_encoder_outputs_to_disk" ,
335- action = "store_true" ,
336- help = "cache text encoder outputs to disk / text encoderの出力をディスクにキャッシュする" ,
337- )
330+ if support_text_encoder_caching :
331+ parser .add_argument (
332+ "--cache_text_encoder_outputs" ,
333+ action = "store_true" ,
334+ help = "cache text encoder outputs / text encoderの出力をキャッシュする" ,
335+ )
336+ parser .add_argument (
337+ "--cache_text_encoder_outputs_to_disk" ,
338+ action = "store_true" ,
339+ help = "cache text encoder outputs to disk / text encoderの出力をディスクにキャッシュする" ,
340+ )
338341 parser .add_argument (
339342 "--disable_mmap_load_safetensors" ,
340343 action = "store_true" ,
341344 help = "disable mmap load for safetensors. Speed up model loading in WSL environment / safetensorsのmmapロードを無効にする。WSL環境等でモデル読み込みを高速化できる" ,
342345 )
343346
344347
345- def verify_sdxl_training_args (args : argparse .Namespace , supportTextEncoderCaching : bool = True ):
348+ def verify_sdxl_training_args (args : argparse .Namespace , support_text_encoder_caching : bool = True ):
346349 assert not args .v2 , "v2 cannot be enabled in SDXL training / SDXL学習ではv2を有効にすることはできません"
347350
348351 if args .clip_skip is not None :
@@ -365,7 +368,7 @@ def verify_sdxl_training_args(args: argparse.Namespace, supportTextEncoderCachin
365368 # not hasattr(args, "weighted_captions") or not args.weighted_captions
366369 # ), "weighted_captions cannot be enabled in SDXL training currently / SDXL学習では今のところweighted_captionsを有効にすることはできません"
367370
368- if supportTextEncoderCaching :
371+ if support_text_encoder_caching :
369372 if args .cache_text_encoder_outputs_to_disk and not args .cache_text_encoder_outputs :
370373 args .cache_text_encoder_outputs = True
371374 logger .warning (
0 commit comments