From 89afcfda3f824cc44221e877182348f9b09687d2 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 16 Jan 2023 10:31:55 +0100 Subject: Handle empty validation dataset --- training/strategy/dreambooth.py | 2 +- training/strategy/ti.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'training/strategy') diff --git a/training/strategy/dreambooth.py b/training/strategy/dreambooth.py index 6e7ebe2..aeaa828 100644 --- a/training/strategy/dreambooth.py +++ b/training/strategy/dreambooth.py @@ -26,7 +26,7 @@ def dreambooth_strategy( vae: AutoencoderKL, sample_scheduler: DPMSolverMultistepScheduler, train_dataloader: DataLoader, - val_dataloader: DataLoader, + val_dataloader: Optional[DataLoader], output_dir: Path, seed: int, train_text_encoder_epochs: int, diff --git a/training/strategy/ti.py b/training/strategy/ti.py index 753dce0..568f9eb 100644 --- a/training/strategy/ti.py +++ b/training/strategy/ti.py @@ -26,7 +26,7 @@ def textual_inversion_strategy( vae: AutoencoderKL, sample_scheduler: DPMSolverMultistepScheduler, train_dataloader: DataLoader, - val_dataloader: DataLoader, + val_dataloader: Optional[DataLoader], output_dir: Path, seed: int, placeholder_tokens: list[str], -- cgit v1.2.3-70-g09d2