sdxl do not has nsfw

This commit is contained in:
Qing 2023-11-14 15:24:30 +08:00
parent 8fbc8059e1
commit 2c9a53da8e

View File

@ -22,15 +22,6 @@ class SDXL(DiffusionInpaintModel):
model_kwargs = {
"local_files_only": kwargs.get("local_files_only", kwargs["sd_run_local"])
}
if kwargs["disable_nsfw"] or kwargs.get("cpu_offload", False):
logger.info("Disable Stable Diffusion Model NSFW checker")
model_kwargs.update(
dict(
safety_checker=None,
feature_extractor=None,
requires_safety_checker=False,
)
)
use_gpu = device == torch.device("cuda") and torch.cuda.is_available()
torch_dtype = torch.float16 if use_gpu and fp16 else torch.float32