mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-16 08:52:45 +00:00
Update prepare_accelerator to handle got an error when training on multigpu
This commit is contained in:
@@ -5525,6 +5525,9 @@ def prepare_accelerator(args: argparse.Namespace):
|
||||
if args.ddp_gradient_as_bucket_view or args.ddp_static_graph
|
||||
else None
|
||||
),
|
||||
(
|
||||
DistributedDataParallelKwargs(find_unused_parameters=True)
|
||||
),
|
||||
]
|
||||
kwargs_handlers = [i for i in kwargs_handlers if i is not None]
|
||||
deepspeed_plugin = deepspeed_utils.prepare_deepspeed_plugin(args)
|
||||
|
||||
Reference in New Issue
Block a user