From 7674a36a34556c9f478f63c3bfb0670ad398f892 Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Thu, 20 Oct 2022 13:52:11 +0200 Subject: [PATCH] [dreambooth] dont use safety check when generating prior images (#922) dont' use safety check when generating prior images --- examples/dreambooth/README.md | 1 - examples/dreambooth/requirements.txt | 1 + examples/dreambooth/train_dreambooth.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dreambooth/README.md b/examples/dreambooth/README.md index dfe54469..fb4bb900 100644 --- a/examples/dreambooth/README.md +++ b/examples/dreambooth/README.md @@ -10,7 +10,6 @@ The `train_dreambooth.py` script shows how to implement the training procedure a Before running the scripts, make sure to install the library's training dependencies: ```bash -pip install git+https://github.com/huggingface/diffusers.git pip install -U -r requirements.txt ``` diff --git a/examples/dreambooth/requirements.txt b/examples/dreambooth/requirements.txt index c0649bbe..2174abfa 100644 --- a/examples/dreambooth/requirements.txt +++ b/examples/dreambooth/requirements.txt @@ -1,3 +1,4 @@ +diffusers>==0.5.0 accelerate torchvision transformers>=4.21.0 diff --git a/examples/dreambooth/train_dreambooth.py b/examples/dreambooth/train_dreambooth.py index 40d5bca4..4fc48321 100644 --- a/examples/dreambooth/train_dreambooth.py +++ b/examples/dreambooth/train_dreambooth.py @@ -343,7 +343,7 @@ def main(): if cur_class_images < args.num_class_images: torch_dtype = torch.float16 if accelerator.device.type == "cuda" else torch.float32 pipeline = StableDiffusionPipeline.from_pretrained( - args.pretrained_model_name_or_path, torch_dtype=torch_dtype + args.pretrained_model_name_or_path, torch_dtype=torch_dtype, safety_checker=None ) pipeline.set_progress_bar_config(disable=True)