sd-scripts
sd-scripts copied to clipboard
cache_text_encoder_outputs.py raises AttributeError: 'Namespace' object has no attribute 'deepspeed'
Seeing this on the main branch:
Traceback (most recent call last):
File "/home/deli/images/sd-scripts/tools/cache_text_encoder_outputs.py", line 194, in <module>
cache_to_disk(args)
File "/home/deli/images/sd-scripts/tools/cache_text_encoder_outputs.py", line 102, in cache_to_disk
accelerator = train_util.prepare_accelerator(args)
File "/home/deli/images/sd-scripts/library/train_util.py", line 4303, in prepare_accelerator
deepspeed_plugin = deepspeed_utils.prepare_deepspeed_plugin(args)
File "/home/deli/images/sd-scripts/library/deepspeed_utils.py", line 71, in prepare_deepspeed_plugin
if not args.deepspeed:
AttributeError: 'Namespace' object has no attribute 'deepspeed'
FYI @BootsofLagrangian
It is because cache_text_encoder_outputs.py does not prepare deepspeed config not like train_.py
you can add ad-hoc for this
-
from library import deepspeed_utils
-
in line between 174-178,
train_util.add_sd_models_arguments(parser)
train_util.add_training_arguments(parser, True)
train_util.add_dataset_arguments(parser, True, True, True)
config_util.add_config_arguments(parser)
sdxl_train_util.add_sdxl_training_arguments(parser)
to
train_util.add_sd_models_arguments(parser)
train_util.add_training_arguments(parser, True)
train_util.add_dataset_arguments(parser, True, True, True)
+ deepspeed_utils.prepare_deepspeed_args(args)
config_util.add_config_arguments(parser)
sdxl_train_util.add_sdxl_training_arguments(parser)
Same problem in cache_latents.py. (I thought this "Deepspeed" stuff was going to be in a separate branch since it was hard to maintain...)