[dreambooth] dont use safety check when generating prior images (#922)

dont' use safety check when generating prior images
This commit is contained in:
Suraj Patil 2022-10-20 13:52:11 +02:00 committed by GitHub
parent a5eb7f4293
commit 7674a36a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View File

@ -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: Before running the scripts, make sure to install the library's training dependencies:
```bash ```bash
pip install git+https://github.com/huggingface/diffusers.git
pip install -U -r requirements.txt pip install -U -r requirements.txt
``` ```

View File

@ -1,3 +1,4 @@
diffusers>==0.5.0
accelerate accelerate
torchvision torchvision
transformers>=4.21.0 transformers>=4.21.0

View File

@ -343,7 +343,7 @@ def main():
if cur_class_images < args.num_class_images: if cur_class_images < args.num_class_images:
torch_dtype = torch.float16 if accelerator.device.type == "cuda" else torch.float32 torch_dtype = torch.float16 if accelerator.device.type == "cuda" else torch.float32
pipeline = StableDiffusionPipeline.from_pretrained( 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) pipeline.set_progress_bar_config(disable=True)