From 9d6252e63bac241e5c6191eb47adb51b84a5d782 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 21 Feb 2023 11:50:11 +0100 Subject: Don't rely on Accelerate for gradient accumulation --- training/strategy/dreambooth.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'training/strategy') diff --git a/training/strategy/dreambooth.py b/training/strategy/dreambooth.py index d697554..fcf5c0d 100644 --- a/training/strategy/dreambooth.py +++ b/training/strategy/dreambooth.py @@ -41,12 +41,6 @@ def dreambooth_strategy_callbacks( sample_guidance_scale: float = 7.5, sample_image_size: Optional[int] = None, ): - if accelerator.gradient_accumulation_steps > 1 and accelerator.num_processes > 1: - raise ValueError( - "Gradient accumulation is not supported when training the text encoder in distributed training. " - "Please set gradient_accumulation_steps to 1. This feature will be supported in the future." - ) - sample_output_dir.mkdir(parents=True, exist_ok=True) checkpoint_output_dir.mkdir(parents=True, exist_ok=True) -- cgit v1.2.3-54-g00ecf