Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Suppress safety checker warnings #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def main():
safety_checker=None,
vae=AutoencoderKL.from_pretrained(args.pretrained_vae_name_or_path or args.pretrained_model_name_or_path,subfolder=None if args.pretrained_vae_name_or_path else "vae" ,safe_serialization=True),
torch_dtype=torch_dtype,
requires_safety_checker=False,
)
pipeline.set_progress_bar_config(disable=True)
pipeline.to(accelerator.device)
Expand Down Expand Up @@ -934,6 +934,7 @@ def mid_train_playground(step):
safety_checker=None,
torch_dtype=weight_dtype,
local_files_only=False,
requires_safety_checker=False,
)
pipeline.scheduler = scheduler
if is_xformers_available() and args.attention=='xformers':
Expand Down Expand Up @@ -1087,6 +1088,7 @@ def save_and_sample_weights(step,context='checkpoint',save_model=True):
safety_checker=None,
torch_dtype=weight_dtype,
local_files_only=False,
requires_safety_checker=False,
)
pipeline.scheduler = scheduler
if is_xformers_available() and args.attention=='xformers':
Expand Down